Skip to content

feat: Enable Imported models #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sean-smith
Copy link
Contributor

@sean-smith sean-smith commented Jan 29, 2025

This allows users to call models they've imported (if enabled by an environment variable):

For example:

from openai import OpenAI

client = OpenAI()
completion = client.chat.completions.create(
    model="arn:aws:bedrock:us-west-2:<account-id>:imported-model/<model-id>",
    # model="meta.llama3-3-70b-instruct-v1:0",
    messages=[
        {
            "role": "user",
            "content": "Hello! please tell me a joke"
        }
    ],
)

These models also show up in the model list:

client.models.list()

This resolves #99

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@asadafa123
Copy link

Can this also support models deployed with sagemaker endpoint? Not sure because in aws console the arn are like: arn:aws:sagemaker:us-east-1:ACCOUNT_ID:endpoint/endpoint-quick-start-pu6a8, arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/deepseek-llm-r1-distill-qwen-7b/1.0.0

@daixba
Copy link
Contributor

daixba commented Feb 10, 2025

Thanks for the contribution.

I am afraid I can't merge the code for now. The repo is using converse API to access Bedrock Models. But right now, there are very limited support on custom imported models for the converse API. So it's confusing to have such feature included at this stage. We may also want to deal with the cold start of imported models in the future.

@sean-smith
Copy link
Contributor Author

Can this also support models deployed with sagemaker endpoint? Not sure because in aws console the arn are like: arn:aws:sagemaker:us-east-1:ACCOUNT_ID:endpoint/endpoint-quick-start-pu6a8, arn:aws:sagemaker:us-east-1:aws:hub-content/SageMakerPublicHub/Model/deepseek-llm-r1-distill-qwen-7b/1.0.0

No, this is limited to just bedrock model imports (which is different from bedrock fine tuned models).

Thanks for the contribution.

I am afraid I can't merge the code for now. The repo is using converse API to access Bedrock Models. But right now, there are very limited support on custom imported models for the converse API. So it's confusing to have such feature included at this stage. We may also want to deal with the cold start of imported models in the future.

@daixba It would be useful to see the roadmap for custom model import. Right now the integration is very much lacking and it seems like the bedrock is not investing into custom model import.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Support for imported models?
3 participants