qdtomassi commited on
Commit
79a77b6
·
verified ·
1 Parent(s): 94fae21

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +37 -0
README.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ metrics:
4
+ - accuracy
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - code
8
+ - mlx
9
+ - mlx-my-repo
10
+ base_model: defog/llama-3-sqlcoder-8b
11
+ ---
12
+
13
+ # qdtomassi/llama-3-sqlcoder-8b-mlx-4Bit
14
+
15
+ The Model [qdtomassi/llama-3-sqlcoder-8b-mlx-4Bit](https://huggingface.co/qdtomassi/llama-3-sqlcoder-8b-mlx-4Bit) was converted to MLX format from [defog/llama-3-sqlcoder-8b](https://huggingface.co/defog/llama-3-sqlcoder-8b) using mlx-lm version **0.22.3**.
16
+
17
+ ## Use with mlx
18
+
19
+ ```bash
20
+ pip install mlx-lm
21
+ ```
22
+
23
+ ```python
24
+ from mlx_lm import load, generate
25
+
26
+ model, tokenizer = load("qdtomassi/llama-3-sqlcoder-8b-mlx-4Bit")
27
+
28
+ prompt="hello"
29
+
30
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
31
+ messages = [{"role": "user", "content": prompt}]
32
+ prompt = tokenizer.apply_chat_template(
33
+ messages, tokenize=False, add_generation_prompt=True
34
+ )
35
+
36
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
37
+ ```