m-i commited on
Commit
49ae922
·
verified ·
1 Parent(s): cdf73e2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - translation
5
+ - mlx
6
+ - mlx-my-repo
7
+ language:
8
+ - zh
9
+ - en
10
+ - fr
11
+ - pt
12
+ - es
13
+ - ja
14
+ - tr
15
+ - ru
16
+ - ar
17
+ - ko
18
+ - th
19
+ - it
20
+ - de
21
+ - vi
22
+ - ms
23
+ - id
24
+ - tl
25
+ - hi
26
+ - pl
27
+ - cs
28
+ - nl
29
+ - km
30
+ - my
31
+ - fa
32
+ - gu
33
+ - ur
34
+ - te
35
+ - mr
36
+ - he
37
+ - bn
38
+ - ta
39
+ - uk
40
+ - bo
41
+ - kk
42
+ - mn
43
+ - ug
44
+ base_model: tencent/HY-MT1.5-1.8B
45
+ ---
46
+
47
+ # m-i/HY-MT1.5-1.8B-mlx-fp16
48
+
49
+ The Model [m-i/HY-MT1.5-1.8B-mlx-fp16](https://huggingface.co/m-i/HY-MT1.5-1.8B-mlx-fp16) was converted to MLX format from [tencent/HY-MT1.5-1.8B](https://huggingface.co/tencent/HY-MT1.5-1.8B) using mlx-lm version **0.28.3**.
50
+
51
+ ## Use with mlx
52
+
53
+ ```bash
54
+ pip install mlx-lm
55
+ ```
56
+
57
+ ```python
58
+ from mlx_lm import load, generate
59
+
60
+ model, tokenizer = load("m-i/HY-MT1.5-1.8B-mlx-fp16")
61
+
62
+ prompt="hello"
63
+
64
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
65
+ messages = [{"role": "user", "content": prompt}]
66
+ prompt = tokenizer.apply_chat_template(
67
+ messages, tokenize=False, add_generation_prompt=True
68
+ )
69
+
70
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
71
+ ```