Skip to content

Commit 046cf15

Browse files
authored
update documentation (#258)
- fix broken link to Troubleshooting - use current Mistral model identifier - clarify use of mlx-run
1 parent 15e57f3 commit 046cf15

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ the command line:
4949
./mlx-run llm-tool --prompt "swift programming language"
5050
```
5151

52+
Note: `mlx-run` is a shell script that uses `xcode` command line tools to
53+
locate the built binaries. It is equivalent to running from Xcode itself.
54+
5255
See also:
5356

5457
- [MLX troubleshooting](https://swiftpackageindex.com/ml-explore/mlx-swift/main/documentation/mlx/troubleshooting)

Tools/llm-tool/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Build the `llm-tool` scheme in Xcode.
1515
To run this in Xcode simply press cmd-opt-r to set the scheme arguments. For example:
1616

1717
```
18-
--model mlx-community/Mistral-7B-v0.1-hf-4bit-mlx
18+
--model mlx-community/Mistral-7B-Instruct-v0.3-4bit
1919
--prompt "swift programming language"
2020
--max-tokens 50
2121
```
@@ -27,7 +27,7 @@ the Hugging Face HubApi stores the downloaded files.
2727

2828
The model should be a path in the Hugging Face repository, e.g.:
2929

30-
- `mlx-community/Mistral-7B-v0.1-hf-4bit-mlx`
30+
- `mlx-community/Mistral-7B-Instruct-v0.3-4bit`
3131
- `mlx-community/phi-2-hf-4bit-mlx`
3232

3333
See [LLM](../../Libraries/MLXLLM/README.md) for more info.
@@ -40,12 +40,15 @@ Use the `mlx-run` script to run the command line tools:
4040
./mlx-run llm-tool --prompt "swift programming language"
4141
```
4242

43+
Note: `mlx-run` is a shell script that uses `xcode` command line tools to
44+
locate the built binaries. It is equivalent to running from Xcode itself.
45+
4346
By default this will find and run the tools built in _Release_ configuration. Specify `--debug`
4447
to find and run the tool built in _Debug_ configuration.
4548

4649
See also:
4750

48-
- [MLX troubleshooting](https://ml-explore.github.io/mlx-swift/MLX/documentation/mlx/troubleshooting)
51+
- [MLX troubleshooting](https://swiftpackageindex.com/ml-explore/mlx-swift/main/documentation/mlx/troubleshooting)
4952

5053
### Troubleshooting
5154

@@ -126,7 +129,7 @@ Here is an example run using adapters on the last 4 layers of the model:
126129
giving output like this:
127130

128131
```
129-
Model: mlx-community/Mistral-7B-v0.1-hf-4bit-mlx
132+
Model: mlx-community/Mistral-7B-Instruct-v0.3-4bit
130133
Total parameters: 1,242M
131134
Trainable parameters: 0.426M
132135
Iteration 1: validation loss 2.443872, validation time 3.330629s
@@ -163,7 +166,7 @@ You can test the LoRA adapated model against the `test` dataset using this comma
163166

164167
```
165168
./mlx-run llm-tool lora test \
166-
--model mlx-community/Mistral-7B-v0.1-hf-4bit-mlx \
169+
--model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
167170
--data Data/lora \
168171
--adapter /tmp/lora-layers-4.safetensors \
169172
--batch-size 1 --lora-layers 4 \
@@ -173,7 +176,7 @@ You can test the LoRA adapated model against the `test` dataset using this comma
173176
This will run all the items (100 in the example data we are using) in the test set and compute the loss:
174177

175178
```
176-
Model: mlx-community/Mistral-7B-v0.1-hf-4bit-mlx
179+
Model: mlx-community/Mistral-7B-Instruct-v0.3-4bit
177180
Total parameters: 1,242M
178181
Trainable parameters: 0.426M
179182
Test loss 1.327623, ppl 3.772065
@@ -192,7 +195,7 @@ Given that format you might issue a command like this:
192195

193196
```
194197
./mlx-run llm-tool lora eval \
195-
--model mlx-community/Mistral-7B-v0.1-hf-4bit-mlx \
198+
--model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
196199
--adapter /tmp/lora-layers-4.safetensors \
197200
--lora-layers 4 \
198201
--prompt "table: 1-10015132-16
@@ -206,7 +209,7 @@ A: "
206209
You might be treated to a response like this:
207210

208211
```
209-
Model: mlx-community/Mistral-7B-v0.1-hf-4bit-mlx
212+
Model: mlx-community/Mistral-7B-Instruct-v0.3-4bit
210213
Total parameters: 1,242M
211214
Trainable parameters: 0.426M
212215
Starting generation ...
@@ -223,7 +226,7 @@ have the adapter weights merged in:
223226

224227
```
225228
./mlx-run llm-tool lora fuse \
226-
--model mlx-community/Mistral-7B-v0.1-hf-4bit-mlx \
229+
--model mlx-community/Mistral-7B-Instruct-v0.3-4bit \
227230
--adapter /tmp/lora-layers-4.safetensors \
228231
--output mlx-community/mistral-lora
229232
```

Tools/mnist-tool/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ to find and run the tool built in _Debug_ configuration.
3535

3636
See also:
3737

38-
- [MLX troubleshooting](https://ml-explore.github.io/mlx-swift/MLX/documentation/mlx/troubleshooting)
38+
- [MLX troubleshooting](https://swiftpackageindex.com/ml-explore/mlx-swift/main/documentation/mlx/troubleshooting)

0 commit comments

Comments
 (0)