Enumerations Classes
Smarter API LLMHost Manifest - enumerated datatypes.
An LLMHost separates what is served from how it is served, so that no single model hub or inference server is baked into the manifest:
SAMLLMHostModelSource: where the weights come from, e.g. Hugging Face, the Ollama library, S3, a URL, or a pre-populated volume.SAMLLMHostEngine: the inference server that loads the weights and exposes an API, e.g. vLLM or llama.cpp.SAMLLMHostApiFormat: the wire protocol that the inference server speaks.
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostApiFormat(*values)[source]
Bases:
SmarterEnumAbstractThe wire protocol that an LLMHost’s inference server speaks.
openai_compatible: the OpenAI/v1/chat/completions,/v1/completionsand/v1/embeddingsAPI. Every built-in engine speaks it.huggingface: the Hugging Face/generateAPI, of TGI.ollama_native: Ollama’s/api/chatAPI.custom: anything else.
- CUSTOM = 'custom'
- HUGGINGFACE = 'huggingface'
- OLLAMA_NATIVE = 'ollama_native'
- OPENAI_COMPATIBLE = 'openai_compatible'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostEngine(*values)[source]
Bases:
SmarterEnumAbstractThe inference server that loads an LLMHost’s weights and exposes an API.
vllm: vLLM, high-throughput GPU serving.tgi: Hugging Face Text Generation Inference.sglang: SGLang.llama_cpp: llama.cpp’sllama-server, for GGUF models, on CPU or GPU.ollama: Ollama, for GGUF models, on CPU or GPU.tei: Hugging Face Text Embeddings Inference, for embedding models.custom: any other container image, configured withengine.image,engine.portandengine.args.
- CUSTOM = 'custom'
- LLAMA_CPP = 'llama_cpp'
- OLLAMA = 'ollama'
- SGLANG = 'sglang'
- TEI = 'tei'
- TGI = 'tgi'
- VLLM = 'vllm'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostEventType(*values)[source]
Bases:
SmarterEnumAbstractThe type of an LLMHost lifecycle event.
- DESTROYED = 'destroyed'
- ERROR = 'error'
- LAUNCHED = 'launched'
- NODES_SCALED = 'nodes_scaled'
- STATUS_CHANGED = 'status_changed'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostModelSource(*values)[source]
Bases:
SmarterEnumAbstractWhere an LLMHost’s model weights come from.
huggingface: a Hugging Face Hub repository, e.g.meta-llama/Llama-3.1-8B-Instruct. The inference engine downloads it, with the optionaltokenSecretfor gated models.ollama: an Ollama library tag, e.g.llama3.1:8b. Requires the ollama engine.s3: an S3 prefix, e.g.s3://bucket/models/llama, copied to the model volume by an init container. Credentials come from the pod’s service account (IRSA).url: a single file, e.g. a GGUF file, downloaded to the model volume by an init container.pvc: weights already on a PersistentVolumeClaim, named bystorage.existingClaim.repositoryis the path within the volume.
- HUGGINGFACE = 'huggingface'
- OLLAMA = 'ollama'
- PVC = 'pvc'
- S3 = 's3'
- URL = 'url'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostQuantization(*values)[source]
Bases:
SmarterEnumAbstractThe numeric precision or compression of an LLMHost’s weights.
It is informational, and is used to estimate the GPU memory that a model requires. It does not change how the engine loads the weights: use
engine.dtypeorengine.args.- AWQ = 'awq'
- BF16 = 'bf16'
- FP16 = 'fp16'
- FP32 = 'fp32'
- FP8 = 'fp8'
- GGUF = 'gguf'
- GPTQ = 'gptq'
- INT4 = 'int4'
- INT8 = 'int8'
- MXFP4 = 'mxfp4'
- NONE = 'none'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostStatusEnum(*values)[source]
Bases:
SmarterEnumAbstractThe lifecycle state of an LLMHost.
provisioning: Smarter is adding a node to the LLMHost’s compute’s node group, and the pods wait for it to join the cluster.pending: deployed, and waiting for the pods to be scheduled.downloading: an init container is copying the weights to the model volume.deploying: the inference server is starting, downloading or loading the weights.active: every replica is ready.degraded: some, but not all, replicas are ready, or the health check fails.inactive: not deployed, e.g. after undeploy.error: the deployment failed, e.g. the image cannot be pulled, or the server crashes.
- ACTIVE = 'active'
- DEGRADED = 'degraded'
- DEPLOYING = 'deploying'
- DOWNLOADING = 'downloading'
- ERROR = 'error'
- INACTIVE = 'inactive'
- PENDING = 'pending'
- PROVISIONING = 'provisioning'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostStorageAccessMode(*values)[source]
Bases:
SmarterEnumAbstractThe access mode of an LLMHost’s model volume.
- READ_ONLY_MANY = 'ReadOnlyMany'
- READ_WRITE_MANY = 'ReadWriteMany'
- READ_WRITE_ONCE = 'ReadWriteOnce'
- class smarter.apps.llmhost.manifest.enum.SAMLLMHostTask(*values)[source]
Bases:
SmarterEnumAbstractWhat an LLMHost’s model does.
text-generation: chat and completions.embedding: vector embeddings.
- EMBEDDING = 'embedding'
- TEXT_GENERATION = 'text-generation'