lrl-modelcloud commited on
Commit
fa29629
·
verified ·
1 Parent(s): 1b2c48a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -0
README.md ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This model was exported using [GPTQModel](https://github.com/ModelCloud/GPTQModel)'s GPTQModel.export(). Below is example code for exporting a model from GPTQ format to MLX format.
2
+
3
+ ## Example:
4
+ ```python
5
+ from gptqmodel import GPTQModel
6
+
7
+ # load gptq quantized model
8
+ gptq_model_path = "ModelCloud/Falcon3-10B-Instruct-gptqmodel-4bit-vortex-v1"
9
+ mlx_path = f"./vortex/Falcon3-10B-Instruct-gptqmodel-4bit-vortex-v1-mlx"
10
+
11
+ # export to mlx model
12
+ GPTQModel.export(gptq_model_path, mlx_path, "mlx")
13
+
14
+ # load mlx model check if it works
15
+ from mlx_lm import load, generate
16
+
17
+ mlx_model, tokenizer = load(mlx_path)
18
+ prompt = "The capital of France is"
19
+
20
+ messages = [{"role": "user", "content": prompt}]
21
+ prompt = tokenizer.apply_chat_template(
22
+ messages, add_generation_prompt=True
23
+ )
24
+
25
+ text = generate(mlx_model, tokenizer, prompt=prompt, verbose=True)
26
+ ```