Django ORM
All models for the LLMHost app.
- class smarter.apps.llmhost.models.LLMHost(*args, **kwargs)[source]
Bases:
MetaDataWithOwnershipModelImplements the LLMHost API model.
Models a self-hosted LLM: its provenance (e.g. a Hugging Face repo), its serving stack (inference engine + endpoint), and the hardware it’s deployed on. Distinct from a hosted/third-party provider config — this assumes the org owns the deployment lifecycle.
- Parameters:
id (Unknown) – Primary key: ID
created_at (Unknown) – Created at
updated_at (Unknown) – Updated at
name (Unknown) – Name. Name in camelCase, e.g., ‘apiKey’, no special characters.
description (Unknown) – Description. A brief description of this resource. Be verbose, but not too verbose.
version (Unknown) – Version. Semantic version in the format MAJOR.MINOR.PATCH, e.g., ‘1.0.0’.
annotations (Unknown) – Annotations. Key-value pairs for annotating this resource.
huggingface_repo_id (Unknown) – Huggingface repo id. e.g. ‘meta-llama/Meta-Llama-3-8B-Instruct’
huggingface_revision (Unknown) – Huggingface revision. Commit SHA or tag pinned for reproducible deploys.
license (Unknown) – License
model_architecture (Unknown) – Model architecture. e.g. ‘llama’, ‘mistral’, ‘mixtral’, ‘qwen2’
parameter_count (Unknown) – Parameter count
context_window (Unknown) – Context window
quantization (Unknown) – Quantization
embedding_dimensions (Unknown) – Embedding dimensions. Set only for embedding models.
supports_streaming (Unknown) – Supports streaming
supports_function_calling (Unknown) – Supports function calling
supports_vision (Unknown) – Supports vision
inference_engine (Unknown) – Inference engine
api_format (Unknown) – Api format
endpoint_url (Unknown) – Endpoint url. Base URL of the inference server.
api_key (Unknown) – Api key
deployment_type (Unknown) – Deployment type
cloud_provider (Unknown) – Cloud provider
region (Unknown) – Region
instance_type (Unknown) – Instance type. e.g. ‘g5.2xlarge’
gpu_type (Unknown) – Gpu type. e.g. ‘A100-80GB’
gpu_count (Unknown) – Gpu count
vram_required_gb (Unknown) – Vram required gb
status (Unknown) – Status
is_active (Unknown) – Is active
health_check_url (Unknown) – Health check url
last_health_check_at (Unknown) – Last health check at
last_health_ok (Unknown) – Last health ok
cost_per_hour (Unknown) – Cost per hour
engine_config (Unknown) – Engine config. Engine-specific launch args, sampling defaults, etc.
Relationship fields:
- Parameters:
user_profile (Unknown) – User profile (related name:
llmhost)tags (Unknown) – Tags. Tags for categorizing and organizing this resource. (related name:
llmhost)tagged_items (Unknown) – Tagged items (related name:
+)
- class ApiFormat(*values)[source]
Bases:
TextChoices- CUSTOM = 'custom'
- HUGGINGFACE = 'huggingface'
- OLLAMA_NATIVE = 'ollama_native'
- OPENAI_COMPATIBLE = 'openai_compatible'
- class CloudProvider(*values)[source]
Bases:
TextChoices- AWS = 'aws'
- AZURE = 'azure'
- GCP = 'gcp'
- ON_PREM = 'on_prem'
- OTHER = 'other'
- class DeploymentType(*values)[source]
Bases:
TextChoices- BARE_METAL = 'bare_metal'
- CLOUD_INSTANCE = 'cloud_instance'
- DOCKER = 'docker'
- KUBERNETES = 'kubernetes'
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- class InferenceEngine(*values)[source]
Bases:
TextChoices- CUSTOM = 'custom'
- LLAMA_CPP = 'llama_cpp'
- OLLAMA = 'ollama'
- SGLANG = 'sglang'
- TGI = 'tgi'
- TRANSFORMERS = 'transformers'
- TRITON = 'triton'
- VLLM = 'vllm'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- class Quantization(*values)[source]
Bases:
TextChoices- AWQ = 'awq'
- BF16 = 'bf16'
- FP16 = 'fp16'
- GGUF = 'gguf'
- GPTQ = 'gptq'
- INT4 = 'int4'
- INT8 = 'int8'
- NONE = 'none'
- class Status(*values)[source]
Bases:
TextChoices- ACTIVE = 'active'
- DEGRADED = 'degraded'
- DEPLOYING = 'deploying'
- DEPRECATED = 'deprecated'
- DOWNLOADING = 'downloading'
- ERROR = 'error'
- INACTIVE = 'inactive'
- PENDING = 'pending'
- api_format
-
Api format
Choices:
openai_compatiblehuggingfaceollama_nativecustom
- Type:
Type
- context_window
-
Context window
- Type:
Type
- cost_per_hour
-
Cost per hour
- Type:
Type
- created_at
-
Created at
Timestamp indicating when the model instance was created.
This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.
- Type:
Type
- deployment_type
-
Deployment type
Choices:
dockerkubernetesbare_metalcloud_instance
- Type:
Type
- description
-
Description. A brief description of this resource. Be verbose, but not too verbose.
- Type:
Type
- embedding_dimensions
-
Embedding dimensions. Set only for embedding models.
- Type:
Type
- engine_config
-
Engine config. Engine-specific launch args, sampling defaults, etc.
- Type:
Type
- get_api_format_display(*, field=<django.db.models.CharField: api_format>)
Shows the label of the
api_format. Seeget_FOO_display()for more information.
- get_cloud_provider_display(*, field=<django.db.models.CharField: cloud_provider>)
Shows the label of the
cloud_provider. Seeget_FOO_display()for more information.
- get_deployment_type_display(*, field=<django.db.models.CharField: deployment_type>)
Shows the label of the
deployment_type. Seeget_FOO_display()for more information.
- get_inference_engine_display(*, field=<django.db.models.CharField: inference_engine>)
Shows the label of the
inference_engine. Seeget_FOO_display()for more information.
- get_quantization_display(*, field=<django.db.models.CharField: quantization>)
Shows the label of the
quantization. Seeget_FOO_display()for more information.
- get_status_display(*, field=<django.db.models.CharField: status>)
Shows the label of the
status. Seeget_FOO_display()for more information.
- gpu_count
-
Gpu count
- Type:
Type
- huggingface_repo_id
-
Huggingface repo id. e.g. ‘meta-llama/Meta-Llama-3-8B-Instruct’
- Type:
Type
- huggingface_revision
-
Huggingface revision. Commit SHA or tag pinned for reproducible deploys.
- Type:
Type
- id
-
Primary key: ID
- Type:
Type
- inference_engine
-
Inference engine
Choices:
vllmtgiollamallama_cppsglangtransformerstritoncustom
- Type:
Type
- is_active
-
Is active
- Type:
Type
- last_health_check_at
-
Last health check at
- Type:
Type
- last_health_ok
-
Last health ok
- Type:
Type
- model_architecture
-
Model architecture. e.g. ‘llama’, ‘mistral’, ‘mixtral’, ‘qwen2’
- Type:
Type
- parameter_count
-
Parameter count
- Type:
Type
- status
-
Status
Choices:
pendingdownloadingdeployingactivedegradedinactiveerrordeprecated
- Type:
Type
- supports_function_calling
-
Supports function calling
- Type:
Type
- supports_streaming
-
Supports streaming
- Type:
Type
- supports_vision
-
Supports vision
- Type:
Type
- tagged_items
Reverse
GenericRelationfromLLMHostAll + of this tagged item (related name of
tagged_items)- Type:
Type
- tags = <taggit.managers._TaggableManager object>
- updated_at
-
Updated at
Timestamp indicating when the model instance was last updated.
This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.
- Type:
Type
- user_profile
-
User profile (related name:
llmhost)- Type:
Type
- user_profile_id
Internal field, use
user_profileinstead.
- version
-
Version. Semantic version in the format MAJOR.MINOR.PATCH, e.g., ‘1.0.0’.
- Type:
Type
- vram_required_gb
-
Vram required gb
- Type:
Type