feat: associated models API with post_training

there are likely scenarios where admins of a stack only want to allow clients to fine-tune certain models, register certain models to be fine-tuned. etc
introduce the post_training router and post_training_models as the associated type. A different model type needs to be used for inference vs post_training due to the structure of the router currently.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-05-30 12:05:33 -04:00
parent 63a9f08c9e
commit 71caa271ad
11 changed files with 393 additions and 23 deletions

View file

@ -0,0 +1,23 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.providers.utils.inference.model_registry import (
ProviderModelEntry,
)
model_entries = [
ProviderModelEntry(
provider_model_id="ibm-granite/granite-3.3-8b-instruct",
aliases=["ibm-granite/granite-3.3-8b-instruct"],
model_type=ModelType.llm,
),
ProviderModelEntry(
provider_model_id="ibm-granite/granite-3.3-8b-instruct",
aliases=["ibm-granite/granite-3.3-8b-instruct"],
model_type=ModelType.llm,
),
]