Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Model Garden model id doesn't work when creating TextEmbeddingModel

I've managed to deploy Mistral-7B-v0.1 to a Vertex AI endpoint. For this I've used its model id in the Model Garden ("mistralai/Mistral-7B-v0.1"). But when I use this id for other things, it doesn't work, for example:

from vertexai.language_models import TextGenerationModel

embeddings_model = TextEmbeddingModel.from_pretrained("mistralai/Mistral-7B-v0.1")
text_model = TextGenerationModel.from_pretrained("mistralai/Mistral-7B-v0.1")

Causes an error with the message "Invalid PublisherModel resource name". What id or package should I use to be able to get things such as a TextEmbeddingModel from a model in the Model Garden?

2 REPLIES 2