Skip to content

Commit 554d3e8

Browse files
authored
fix failing tests: replace mixtral test model with scout (#319)
* fix failing tests: replace mixtral test model with scout * Update model references in README examples
1 parent 7e93fbc commit 554d3e8

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ client = Together()
5858

5959
# Simple text message
6060
response = client.chat.completions.create(
61-
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
61+
model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
6262
messages=[{"role": "user", "content": "tell me about new york"}],
6363
)
6464
print(response.choices[0].message.content)
@@ -148,7 +148,7 @@ from together import Together
148148

149149
client = Together()
150150
stream = client.chat.completions.create(
151-
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
151+
model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
152152
messages=[{"role": "user", "content": "tell me about new york"}],
153153
stream=True,
154154
)
@@ -173,7 +173,7 @@ async def async_chat_completion(messages):
173173
async_client = AsyncTogether()
174174
tasks = [
175175
async_client.chat.completions.create(
176-
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
176+
model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
177177
messages=[{"role": "user", "content": message}],
178178
)
179179
for message in messages
@@ -196,7 +196,7 @@ from together import Together
196196
client = Together()
197197

198198
response = client.chat.completions.create(
199-
model="mistralai/Mixtral-8x7B-Instruct-v0.1",
199+
model="meta-llama/Llama-3.2-3B-Instruct-Turbo",
200200
messages=[{"role": "user", "content": "tell me about new york"}],
201201
logprobs=1
202202
)
@@ -347,7 +347,7 @@ client.files.delete(id="file-d0d318cb-b7d9-493a-bd70-1cfe089d3815") # deletes a
347347

348348
### Fine-tunes
349349

350-
The finetune API is used for fine-tuning and allows developers to create finetuning jobs. It also has several methods to list all jobs, retrive statuses and get checkpoints. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-python).
350+
The finetune API is used for fine-tuning and allows developers to create finetuning jobs. It also has several methods to list all jobs, retrive statuses and get checkpoints. Please refer to our fine-tuning docs [here](https://docs.together.ai/docs/fine-tuning-quickstart).
351351

352352
```python
353353
from together import Together
@@ -356,7 +356,7 @@ client = Together()
356356

357357
client.fine_tuning.create(
358358
training_file = 'file-d0d318cb-b7d9-493a-bd70-1cfe089d3815',
359-
model = 'mistralai/Mixtral-8x7B-Instruct-v0.1',
359+
model = 'meta-llama/Llama-3.2-3B-Instruct',
360360
n_epochs = 3,
361361
n_checkpoints = 1,
362362
batch_size = "max",
@@ -394,7 +394,7 @@ for model in models:
394394
together chat.completions \
395395
--message "system" "You are a helpful assistant named Together" \
396396
--message "user" "What is your name?" \
397-
--model mistralai/Mixtral-8x7B-Instruct-v0.1
397+
--model meta-llama/Llama-4-Scout-17B-16E-Instruct
398398
```
399399

400400
The Chat Completions CLI enables streaming tokens to stdout by default. To disable streaming, use `--no-stream`.
@@ -404,7 +404,7 @@ The Chat Completions CLI enables streaming tokens to stdout by default. To disab
404404
```bash
405405
together completions \
406406
"Large language models are " \
407-
--model mistralai/Mixtral-8x7B-v0.1 \
407+
--model meta-llama/Llama-4-Scout-17B-16E-Instruct \
408408
--max-tokens 512 \
409409
--stop "."
410410
```

src/together/cli/api/endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def endpoints(ctx: click.Context) -> None:
8282
@click.option(
8383
"--model",
8484
required=True,
85-
help="The model to deploy (e.g. mistralai/Mixtral-8x7B-Instruct-v0.1)",
85+
help="The model to deploy (e.g. meta-llama/Llama-4-Scout-17B-16E-Instruct)",
8686
)
8787
@click.option(
8888
"--min-replicas",

tests/integration/resources/test_completion_stream.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_create(
3535
random_repetition_penalty, # noqa
3636
) -> None:
3737
prompt = "The space robots have"
38-
model = "mistralai/Mixtral-8x7B-v0.1"
38+
model = "meta-llama/Llama-4-Scout-17B-16E-Instruct"
3939
stop = ["</s>"]
4040

4141
# max_tokens should be a reasonable number for this test
@@ -69,10 +69,12 @@ def test_create(
6969
assert isinstance(chunk.id, str)
7070
assert isinstance(chunk.created, int)
7171
assert isinstance(chunk.object, ObjectType)
72-
assert isinstance(chunk.choices[0], CompletionChoicesChunk)
73-
assert isinstance(chunk.choices[0].index, int)
74-
assert isinstance(chunk.choices[0].delta, DeltaContent)
75-
assert isinstance(chunk.choices[0].delta.content, str)
72+
73+
if chunk.choices:
74+
assert isinstance(chunk.choices[0], CompletionChoicesChunk)
75+
assert isinstance(chunk.choices[0].index, int)
76+
assert isinstance(chunk.choices[0].delta, DeltaContent)
77+
assert isinstance(chunk.choices[0].delta.content, str)
7678

7779
usage = chunk.usage
7880

0 commit comments

Comments
 (0)