Felladrin commited on
Commit
7585940
·
verified ·
1 Parent(s): 857fadb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +44 -0
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ license_link: https://huggingface.co/microsoft/Phi-4-mini-instruct/resolve/main/LICENSE
4
+ language:
5
+ - multilingual
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - nlp
9
+ - code
10
+ - mlx
11
+ - mlx-my-repo
12
+ widget:
13
+ - messages:
14
+ - role: user
15
+ content: Can you provide ways to eat combinations of bananas and dragonfruits?
16
+ library_name: transformers
17
+ base_model: microsoft/Phi-4-mini-instruct
18
+ ---
19
+
20
+ # Felladrin/Phi-4-mini-instruct-Q6-mlx
21
+
22
+ The Model [Felladrin/Phi-4-mini-instruct-Q6-mlx](https://huggingface.co/Felladrin/Phi-4-mini-instruct-Q6-mlx) was converted to MLX format from [microsoft/Phi-4-mini-instruct](https://huggingface.co/microsoft/Phi-4-mini-instruct) using mlx-lm version **0.21.5**.
23
+
24
+ ## Use with mlx
25
+
26
+ ```bash
27
+ pip install mlx-lm
28
+ ```
29
+
30
+ ```python
31
+ from mlx_lm import load, generate
32
+
33
+ model, tokenizer = load("Felladrin/Phi-4-mini-instruct-Q6-mlx")
34
+
35
+ prompt="hello"
36
+
37
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
38
+ messages = [{"role": "user", "content": prompt}]
39
+ prompt = tokenizer.apply_chat_template(
40
+ messages, tokenize=False, add_generation_prompt=True
41
+ )
42
+
43
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
44
+ ```