tony-mayse commited on
Commit
6eb21eb
·
verified ·
1 Parent(s): efe0c69

Upload README.md with huggingface_hub

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