mihainadas commited on
Commit
b5702a6
·
verified ·
1 Parent(s): 68b6c52

Add files using upload-large-folder tool

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: klusai/tf3-50M-base
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - mlx
7
+ library_name: mlx
8
+ ---
9
+
10
+ # klusai/tf3-50m-base-mlx
11
+
12
+ This model [klusai/tf3-50m-base-mlx](https://huggingface.co/klusai/tf3-50m-base-mlx) was
13
+ converted to MLX format from [klusai/tf3-50M-base](https://huggingface.co/klusai/tf3-50M-base)
14
+ using mlx-lm version **0.27.1**.
15
+
16
+ ## Use with mlx
17
+
18
+ ```bash
19
+ pip install mlx-lm
20
+ ```
21
+
22
+ ```python
23
+ from mlx_lm import load, generate
24
+
25
+ model, tokenizer = load("klusai/tf3-50m-base-mlx")
26
+
27
+ prompt = "hello"
28
+
29
+ if tokenizer.chat_template is not None:
30
+ messages = [{"role": "user", "content": prompt}]
31
+ prompt = tokenizer.apply_chat_template(
32
+ messages, add_generation_prompt=True
33
+ )
34
+
35
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
36
+ ```