alexgusevski commited on
Commit
874638f
·
verified ·
1 Parent(s): fc41a5f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ - ar
5
+ - zh
6
+ - cs
7
+ - da
8
+ - nl
9
+ - en
10
+ - fi
11
+ - fr
12
+ - de
13
+ - he
14
+ - hu
15
+ - it
16
+ - ja
17
+ - ko
18
+ - 'no'
19
+ - pl
20
+ - pt
21
+ - ru
22
+ - es
23
+ - sv
24
+ - th
25
+ - tr
26
+ - uk
27
+ library_name: transformers
28
+ license: mit
29
+ license_link: https://huggingface.co/microsoft/Phi-4-mini-instruct/resolve/main/LICENSE
30
+ pipeline_tag: text-generation
31
+ tags:
32
+ - nlp
33
+ - code
34
+ - mlx
35
+ - mlx-my-repo
36
+ widget:
37
+ - messages:
38
+ - role: user
39
+ content: Can you provide ways to eat combinations of bananas and dragonfruits?
40
+ base_model: microsoft/Phi-4-mini-instruct
41
+ ---
42
+
43
+ # alexgusevski/Phi-4-mini-instruct-mlx-fp16
44
+
45
+ The Model [alexgusevski/Phi-4-mini-instruct-mlx-fp16](https://huggingface.co/alexgusevski/Phi-4-mini-instruct-mlx-fp16) 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**.
46
+
47
+ ## Use with mlx
48
+
49
+ ```bash
50
+ pip install mlx-lm
51
+ ```
52
+
53
+ ```python
54
+ from mlx_lm import load, generate
55
+
56
+ model, tokenizer = load("alexgusevski/Phi-4-mini-instruct-mlx-fp16")
57
+
58
+ prompt="hello"
59
+
60
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
61
+ messages = [{"role": "user", "content": prompt}]
62
+ prompt = tokenizer.apply_chat_template(
63
+ messages, tokenize=False, add_generation_prompt=True
64
+ )
65
+
66
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
67
+ ```