MLX
English
llama
mc0ps commited on
Commit
ba57a3f
·
verified ·
1 Parent(s): edfa0b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -5
README.md CHANGED
@@ -9,13 +9,18 @@ datasets:
9
  - bigcode/starcoderdata
10
  ---
11
 
12
- # TinyLlama-1.1B-intermediate-step-1431k-3T-mlx
13
  This model was converted to MLX format from [`TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T`]().
14
  Refer to the [original model card](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) for more details on the model.
15
  ## Use with mlx
 
16
  ```bash
17
- pip install mlx
18
- git clone https://github.com/ml-explore/mlx-examples.git
19
- cd mlx-examples/llms/hf_llm
20
- python generate.py --model mlx-community/TinyLlama-1.1B-intermediate-step-1431k-3T-mlx --prompt "My name is"
 
 
 
 
21
  ```
 
9
  - bigcode/starcoderdata
10
  ---
11
 
12
+ # mlx-community/TinyLlama-1.1B-intermediate-step-1431k-3T-mlx
13
  This model was converted to MLX format from [`TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T`]().
14
  Refer to the [original model card](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) for more details on the model.
15
  ## Use with mlx
16
+
17
  ```bash
18
+ pip install mlx-lm
19
+ ```
20
+
21
+ ```python
22
+ from mlx_lm import load, generate
23
+
24
+ model, tokenizer = load("mlx-community/TinyLlama-1.1B-intermediate-step-1431k-3T-mlx")
25
+ response = generate(model, tokenizer, prompt="hello", verbose=True)
26
  ```