mrs83 commited on
Commit
8d3168f
·
verified ·
1 Parent(s): 2617276

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - de
5
+ - fr
6
+ - zh
7
+ - pt
8
+ - nl
9
+ - ru
10
+ - ko
11
+ - it
12
+ - es
13
+ license: cc-by-nc-4.0
14
+ metrics:
15
+ - comet
16
+ pipeline_tag: translation
17
+ tags:
18
+ - mlx
19
+ base_model: Unbabel/TowerInstruct-7B-v0.2
20
+ ---
21
+
22
+ # mrs83/TowerInstruct-7B-v0.2-mlx-4Bit
23
+
24
+ The Model [mrs83/TowerInstruct-7B-v0.2-mlx-4Bit](https://huggingface.co/mrs83/TowerInstruct-7B-v0.2-mlx-4Bit) was converted to MLX format from [Unbabel/TowerInstruct-7B-v0.2](https://huggingface.co/Unbabel/TowerInstruct-7B-v0.2) using mlx-lm version **0.22.1**.
25
+
26
+ ## Use with mlx
27
+
28
+ ```bash
29
+ pip install mlx-lm
30
+ ```
31
+
32
+ ```python
33
+ from mlx_lm import load, generate
34
+
35
+ model, tokenizer = load("mrs83/TowerInstruct-7B-v0.2-mlx-4Bit")
36
+
37
+ prompt="hello"
38
+
39
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
40
+ messages = [{"role": "user", "content": prompt}]
41
+ prompt = tokenizer.apply_chat_template(
42
+ messages, tokenize=False, add_generation_prompt=True
43
+ )
44
+
45
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
46
+ ```