Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
license_link: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/resolve/main/LICENSE
|
4 |
-
|
5 |
language:
|
6 |
- en
|
7 |
pipeline_tag: text-generation
|
@@ -16,95 +15,66 @@ widget:
|
|
16 |
- role: user
|
17 |
content: Can you provide ways to eat combinations of bananas and dragonfruits?
|
18 |
quantized_by: bartowski
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
---
|
|
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
<b>I'm calling this Phi-3.1 because Microsoft made the decision to release a huge update in place.. So yes, it's the new model from June 2nd 2024, but I've renamed it for clarity.</b>
|
24 |
-
|
25 |
-
Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b3278">b3278</a> for quantization.
|
26 |
-
|
27 |
-
Original model: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
|
28 |
|
29 |
-
|
|
|
|
|
30 |
|
31 |
-
##
|
|
|
|
|
32 |
|
33 |
-
|
34 |
-
<|system|> {system_prompt}<|end|><|user|> {prompt}<|end|><|assistant|>
|
35 |
-
```
|
36 |
|
37 |
-
##
|
38 |
-
|
39 |
-
| Filename | Quant type | File Size | Description |
|
40 |
-
| -------- | ---------- | --------- | ----------- |
|
41 |
-
| [Phi-3.1-mini-4k-instruct-Q8_0_L.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q8_1.gguf) | Q8_0_L | 4.24GB | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. Extremely high quality, generally unneeded but max available quant. |
|
42 |
-
| [Phi-3.1-mini-4k-instruct-Q8_0.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q8_0.gguf) | Q8_0 | 4.06GB | Extremely high quality, generally unneeded but max available quant. |
|
43 |
-
| [Phi-3.1-mini-4k-instruct-Q6_K_L.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q6_K_L.gguf) | Q6_K_L | 3.36GB | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. Very high quality, near perfect, *recommended*. |
|
44 |
-
| [Phi-3.1-mini-4k-instruct-Q6_K.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q6_K.gguf) | Q6_K | 3.13GB | Very high quality, near perfect, *recommended*. |
|
45 |
-
| [Phi-3.1-mini-4k-instruct-Q5_K_L.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q5_K_L.gguf) | Q5_K_L | 3.06GB | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. High quality, *recommended*. |
|
46 |
-
| [Phi-3.1-mini-4k-instruct-Q5_K_M.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q5_K_M.gguf) | Q5_K_M | 2.81GB | High quality, *recommended*. |
|
47 |
-
| [Phi-3.1-mini-4k-instruct-Q5_K_S.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q5_K_S.gguf) | Q5_K_S | 2.64GB | High quality, *recommended*. |
|
48 |
-
| [Phi-3.1-mini-4k-instruct-Q4_K_L.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q4_K_L.gguf) | Q4_K_L | 2.65GB | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. Good quality, uses about 4.83 bits per weight, *recommended*. |
|
49 |
-
| [Phi-3.1-mini-4k-instruct-Q4_K_M.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q4_K_M.gguf) | Q4_K_M | 2.39GB | Good quality, uses about 4.83 bits per weight, *recommended*. |
|
50 |
-
| [Phi-3.1-mini-4k-instruct-Q4_K_S.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q4_K_S.gguf) | Q4_K_S | 2.18GB | Slightly lower quality with more space savings, *recommended*. |
|
51 |
-
| [Phi-3.1-mini-4k-instruct-IQ4_XS.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ4_XS.gguf) | IQ4_XS | 2.05GB | Decent quality, smaller than Q4_K_S with similar performance, *recommended*. |
|
52 |
-
| [Phi-3.1-mini-4k-instruct-Q3_K_XL.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q3_K_XL.gguf) | Q3_K_XL | 2.35GB | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. Lower quality but usable, good for low RAM availability. |
|
53 |
-
| [Phi-3.1-mini-4k-instruct-Q3_K_L.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q3_K_L.gguf) | Q3_K_L | 2.08GB | Lower quality but usable, good for low RAM availability. |
|
54 |
-
| [Phi-3.1-mini-4k-instruct-Q3_K_M.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q3_K_M.gguf) | Q3_K_M | 1.95GB | Even lower quality. |
|
55 |
-
| [Phi-3.1-mini-4k-instruct-IQ3_M.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ3_M.gguf) | IQ3_M | 1.85GB | Medium-low quality, new method with decent performance comparable to Q3_K_M. |
|
56 |
-
| [Phi-3.1-mini-4k-instruct-Q3_K_S.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q3_K_S.gguf) | Q3_K_S | 1.68GB | Low quality, not recommended. |
|
57 |
-
| [Phi-3.1-mini-4k-instruct-IQ3_XS.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ3_XS.gguf) | IQ3_XS | 1.62GB | Lower quality, new method with decent performance, slightly better than Q3_K_S. |
|
58 |
-
| [Phi-3.1-mini-4k-instruct-IQ3_XXS.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ3_XXS.gguf) | IQ3_XXS | 1.51GB | Lower quality, new method with decent performance, comparable to Q3 quants. |
|
59 |
-
| [Phi-3.1-mini-4k-instruct-Q2_K.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-Q2_K.gguf) | Q2_K | 1.41GB | Very low quality but surprisingly usable. |
|
60 |
-
| [Phi-3.1-mini-4k-instruct-IQ2_M.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ2_M.gguf) | IQ2_M | 1.31GB | Very low quality, uses SOTA techniques to also be surprisingly usable. |
|
61 |
-
| [Phi-3.1-mini-4k-instruct-IQ2_S.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ2_S.gguf) | IQ2_S | 1.21GB | Very low quality, uses SOTA techniques to be usable. |
|
62 |
-
| [Phi-3.1-mini-4k-instruct-IQ2_XS.gguf](https://huggingface.co/bartowski/Phi-3.1-mini-4k-instruct-GGUF/blob/main/Phi-3.1-mini-4k-instruct-IQ2_XS.gguf) | IQ2_XS | 1.15GB | Very low quality, uses SOTA techniques to be usable. |
|
63 |
-
|
64 |
-
## Downloading using huggingface-cli
|
65 |
-
|
66 |
-
First, make sure you have hugginface-cli installed:
|
67 |
|
68 |
-
|
69 |
-
pip install -U "huggingface_hub[cli]"
|
70 |
-
```
|
71 |
|
72 |
-
|
73 |
|
74 |
```
|
75 |
-
|
|
|
|
|
|
|
|
|
76 |
```
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
```
|
81 |
-
huggingface-cli download bartowski/Phi-3.1-mini-4k-instruct-GGUF --include "Phi-3.1-mini-4k-instruct-Q8_0.gguf/*" --local-dir Phi-3.1-mini-4k-instruct-Q8_0
|
82 |
-
```
|
83 |
-
|
84 |
-
You can either specify a new local-dir (Phi-3.1-mini-4k-instruct-Q8_0) or download them all in place (./)
|
85 |
-
|
86 |
-
## Which file should I choose?
|
87 |
-
|
88 |
-
A great write up with charts showing various performances is provided by Artefact2 [here](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9)
|
89 |
-
|
90 |
-
The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have.
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
|
110 |
-
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
license_link: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/resolve/main/LICENSE
|
|
|
4 |
language:
|
5 |
- en
|
6 |
pipeline_tag: text-generation
|
|
|
15 |
- role: user
|
16 |
content: Can you provide ways to eat combinations of bananas and dragonfruits?
|
17 |
quantized_by: bartowski
|
18 |
+
lm_studio:
|
19 |
+
param_count: 4b
|
20 |
+
use_case: chat
|
21 |
+
release_date: 02-07-2024
|
22 |
+
model_creator: Microsoft
|
23 |
+
prompt_template: Phi 3
|
24 |
+
system_prompt: You are a helpful AI assistant.
|
25 |
+
base_model: Phi
|
26 |
+
original_repo: microsoft/Phi-3-mini-4k-instruct
|
27 |
+
base_model: microsoft/Phi-3-mini-4k-instruct
|
28 |
---
|
29 |
+
## 💫 Community Model> Phi-3.1 mini 4k instruct by Microsoft
|
30 |
|
31 |
+
*👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)*.
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
**Model creator:** [Microsoft](https://huggingface.co/microsoft)<br>
|
34 |
+
**Original model**: [Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct)<br>
|
35 |
+
**GGUF quantization:** provided by [bartowski](https://huggingface.co/bartowski) based on `llama.cpp` release [b3278](https://github.com/ggerganov/llama.cpp/releases/tag/b3278)<br>
|
36 |
|
37 |
+
## Model Summary:
|
38 |
+
Though the name was left as Phi-3 in Microsoft's release, this is NOT the same model as before! It features massive improvements across a range of benchmarks, so we've renamed it as Phi-3.1 for clarity.<br>
|
39 |
+
This update used additional post-training data which improved instruction following, structuring output, multi-turn conversations, explicitly support <|system|> tag, and significantly improve reasoning capability.<br>
|
40 |
|
41 |
+
This model is tuned with common sense, language understanding, math, code, long conteext, and logical reasoning as the primary focus.
|
|
|
|
|
42 |
|
43 |
+
## Prompt template:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
+
Choose the `Phi 3` preset in your LM Studio.
|
|
|
|
|
46 |
|
47 |
+
Under the hood, the model will see a prompt that's formatted like so:
|
48 |
|
49 |
```
|
50 |
+
<|system|>
|
51 |
+
You are a helpful AI assistant.<|end|>
|
52 |
+
<|user|>
|
53 |
+
{prompt}<|end|>
|
54 |
+
<|assistant|>
|
55 |
```
|
56 |
|
57 |
+
## Technical Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
Phi-3.1 Mini-4K-Instruct has 3.8B parameters and is a dense decoder-only Transformer model. The model is fine-tuned with Supervised fine-tuning (SFT) and Direct Preference Optimization (DPO) to ensure alignment with human preferences and safety guidlines.
|
60 |
|
61 |
+
Context length: 4K tokens
|
62 |
|
63 |
+
This model was trained on 3.3T tokens of data and is a combination:
|
64 |
+
- publicly available documents that were filtered rigorously for quality, selected high-quality educational data, and code
|
65 |
+
- Newly created synthetic, “textbook-like” data for the purpose of teaching math, coding, common sense reasoning, general knowledge of the world (science, daily activities, theory of mind, etc.)
|
66 |
+
- High quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness.
|
67 |
|
68 |
+
Phi 3.1 features additional tuning based on customer feedback, emphasizing instruction following, structure output, multi-turn conversation quality, explicitly support <|system|> tag, and significantly improve reasoning capability.
|
69 |
|
70 |
+
Find more details on the arXiv report [here](https://arxiv.org/abs/2404.14219)
|
71 |
|
72 |
+
## Special thanks
|
73 |
|
74 |
+
🙏 Special thanks to [Georgi Gerganov](https://github.com/ggerganov) and the whole team working on [llama.cpp](https://github.com/ggerganov/llama.cpp/) for making all of this possible.
|
75 |
|
76 |
+
🙏 Special thanks to [Kalomaze](https://github.com/kalomaze) for his dataset (linked [here](https://github.com/ggerganov/llama.cpp/discussions/5263)) that was used for calculating the imatrix for the IQ1_M and IQ2_XS quants, which makes them usable even at their tiny size!
|
77 |
|
78 |
+
## Disclaimers
|
79 |
|
80 |
+
LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models. LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.
|