singlestore-labs / private-llm-aws

15 stars 7 forks source link

Select initial models and make available via TF #2

Open wesdottoday opened 1 year ago

wesdottoday commented 1 year ago

We need to have a few models for the users to choose from and then make them available for SageMaker inside of a S3 bucket.

wesdottoday commented 1 year ago

Just a snippet of code I had that informed me of the fact that there are existing models that we can copy over:

# download JumpStart model_manifest file.
boto3.client("s3").download_file(
    f"jumpstart-cache-prod-{aws_region}", "models_manifest.json", "models_manifest.json"
)
with open("models_manifest.json", "rb") as json_file:
    model_list = json.load(json_file)

# filter-out all the Text Embedding models from the manifest list.
text_embedding_models = []
for model in model_list:
    model_id = model["model_id"]
    if "-tcembedding-" in model_id and model_id not in text_embedding_models:
        text_embedding_models.append(model_id)