mingz2022 commited on
Commit
47c942e
·
verified ·
1 Parent(s): 91468b1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ library_name: transformers
5
+ base_model: mrfakename/mistral-small-3.1-24b-instruct-2503-hf
6
+ tags:
7
+ - mlx
8
+ ---
9
+
10
+ # mingz2022/mistral-small-3.1-24b-instruct-2503-hf-mlx-4Bit
11
+
12
+ The Model [mingz2022/mistral-small-3.1-24b-instruct-2503-hf-mlx-4Bit](https://huggingface.co/mingz2022/mistral-small-3.1-24b-instruct-2503-hf-mlx-4Bit) was converted to MLX format from [mrfakename/mistral-small-3.1-24b-instruct-2503-hf](https://huggingface.co/mrfakename/mistral-small-3.1-24b-instruct-2503-hf) using mlx-lm version **0.22.1**.
13
+
14
+ ## Use with mlx
15
+
16
+ ```bash
17
+ pip install mlx-lm
18
+ ```
19
+
20
+ ```python
21
+ from mlx_lm import load, generate
22
+
23
+ model, tokenizer = load("mingz2022/mistral-small-3.1-24b-instruct-2503-hf-mlx-4Bit")
24
+
25
+ prompt="hello"
26
+
27
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
28
+ messages = [{"role": "user", "content": prompt}]
29
+ prompt = tokenizer.apply_chat_template(
30
+ messages, tokenize=False, add_generation_prompt=True
31
+ )
32
+
33
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
34
+ ```