Skip to content

Commit 20a5628

Browse files
authored
Update Mistral Instruct v0.1 to v0.2 (#228)
1 parent 61280fe commit 20a5628

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mistral/mistral-7b-instruct/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ model_cache:
66
- '*.json'
77
- '*.safetensors'
88
- '*.model'
9-
repo_id: mistralai/Mistral-7B-Instruct-v0.1
9+
repo_id: mistralai/Mistral-7B-Instruct-v0.2
1010
model_metadata:
1111
avatar_url: https://cdn.baseten.co/production/static/explore/mistral_logo.png
1212
cover_image_url: https://cdn.baseten.co/production/static/explore/mistral.png
@@ -20,7 +20,7 @@ python_version: py311
2020
requirements:
2121
- sentencepiece
2222
- accelerate
23-
- transformers==4.34.0
23+
- transformers==4.38.1
2424
- torch==2.0.1
2525
resources:
2626
accelerator: A10G

mistral/mistral-7b-instruct/model/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ class Model:
1313
def __init__(self, **kwargs):
1414
self.tokenizer = None
1515
self.model = None
16+
self._config = kwargs["config"]
1617

1718
def load(self):
1819
self.model = AutoModelForCausalLM.from_pretrained(
19-
"mistralai/Mistral-7B-Instruct-v0.1",
20+
self._config["model_cache"][0]["repo_id"],
2021
torch_dtype=torch.float16,
2122
device_map="auto",
2223
)
2324

2425
self.tokenizer = AutoTokenizer.from_pretrained(
25-
"mistralai/Mistral-7B-Instruct-v0.1",
26+
self._config["model_cache"][0]["repo_id"],
2627
device_map="auto",
2728
torch_dtype=torch.float16,
2829
)

0 commit comments

Comments
 (0)