zhibo7 commited on
Commit
6056f6a
·
verified ·
1 Parent(s): 3ff3db7

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -0
README.md CHANGED
@@ -9,3 +9,31 @@ tags:
9
  - code
10
  - mlx
11
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - code
10
  - mlx
11
  ---
12
+
13
+ # mlx-community/Jan-v3-4B-base-instruct-6bit
14
+
15
+ This model [mlx-community/Jan-v3-4B-base-instruct-6bit](https://huggingface.co/mlx-community/Jan-v3-4B-base-instruct-6bit) was
16
+ converted to MLX format from [janhq/Jan-v3-4B-base-instruct](https://huggingface.co/janhq/Jan-v3-4B-base-instruct)
17
+ using mlx-lm version **0.30.5**.
18
+
19
+ ## Use with mlx
20
+
21
+ ```bash
22
+ pip install mlx-lm
23
+ ```
24
+
25
+ ```python
26
+ from mlx_lm import load, generate
27
+
28
+ model, tokenizer = load("mlx-community/Jan-v3-4B-base-instruct-6bit")
29
+
30
+ prompt = "hello"
31
+
32
+ if tokenizer.chat_template is not None:
33
+ messages = [{"role": "user", "content": prompt}]
34
+ prompt = tokenizer.apply_chat_template(
35
+ messages, add_generation_prompt=True, return_dict=False,
36
+ )
37
+
38
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
39
+ ```