mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:57:17 +00:00
all distros
This commit is contained in:
parent
a097bfa761
commit
7103892f54
16 changed files with 79 additions and 62 deletions
|
|
@ -5,6 +5,7 @@
|
|||
# the root directory of this source tree.
|
||||
|
||||
from llama_stack.distribution.datatypes import ModelInput, Provider, ShieldInput
|
||||
from llama_stack.providers.inline.memory.faiss.config import FaissImplConfig
|
||||
from llama_stack.providers.remote.inference.tgi import InferenceAPIImplConfig
|
||||
from llama_stack.templates.template import DistributionTemplate, RunConfigSettings
|
||||
|
||||
|
|
@ -21,11 +22,17 @@ def get_distribution_template() -> DistributionTemplate:
|
|||
"scoring": ["inline::basic", "inline::llm-as-judge", "inline::braintrust"],
|
||||
}
|
||||
|
||||
name = "hf-serverless"
|
||||
inference_provider = Provider(
|
||||
provider_id="hf-serverless",
|
||||
provider_type="remote::hf::serverless",
|
||||
config=InferenceAPIImplConfig.sample_run_config(),
|
||||
)
|
||||
memory_provider = Provider(
|
||||
provider_id="faiss",
|
||||
provider_type="inline::faiss",
|
||||
config=FaissImplConfig.sample_run_config(f"distributions/{name}"),
|
||||
)
|
||||
|
||||
inference_model = ModelInput(
|
||||
model_id="${env.INFERENCE_MODEL}",
|
||||
|
|
@ -37,7 +44,7 @@ def get_distribution_template() -> DistributionTemplate:
|
|||
)
|
||||
|
||||
return DistributionTemplate(
|
||||
name="hf-serverless",
|
||||
name=name,
|
||||
distro_type="self_hosted",
|
||||
description="Use (an external) Hugging Face Inference Endpoint for running LLM inference",
|
||||
docker_image=None,
|
||||
|
|
@ -48,6 +55,7 @@ def get_distribution_template() -> DistributionTemplate:
|
|||
"run.yaml": RunConfigSettings(
|
||||
provider_overrides={
|
||||
"inference": [inference_provider],
|
||||
"memory": [memory_provider],
|
||||
},
|
||||
default_models=[inference_model],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@ providers:
|
|||
type: sqlite
|
||||
namespace: null
|
||||
db_path: ${env.SQLITE_STORE_DIR:~/.llama/distributions/hf-serverless}/faiss_store.db
|
||||
- provider_id: chromadb
|
||||
provider_type: remote::chromadb
|
||||
config: {}
|
||||
- provider_id: pgvector
|
||||
provider_type: remote::pgvector
|
||||
config: {}
|
||||
safety:
|
||||
- provider_id: llama-guard
|
||||
provider_type: inline::llama-guard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue