aciidix commited on
Commit
28a9b6b
·
verified ·
1 Parent(s): 13a19c2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - zh
5
+ base_model: CSHaitao/LegalOne-8B
6
+ tags:
7
+ - legal
8
+ - mlx
9
+ - mlx-my-repo
10
+ ---
11
+
12
+ # aciidix/LegalOne-8B-mlx-4Bit
13
+
14
+ The Model [aciidix/LegalOne-8B-mlx-4Bit](https://huggingface.co/aciidix/LegalOne-8B-mlx-4Bit) was converted to MLX format from [CSHaitao/LegalOne-8B](https://huggingface.co/CSHaitao/LegalOne-8B) using mlx-lm version **0.29.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("aciidix/LegalOne-8B-mlx-4Bit")
26
+
27
+ prompt="hello"
28
+
29
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
30
+ messages = [{"role": "user", "content": prompt}]
31
+ prompt = tokenizer.apply_chat_template(
32
+ messages, tokenize=False, add_generation_prompt=True
33
+ )
34
+
35
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
36
+ ```