Upload folder using huggingface_hub
Browse files- .gitattributes +25 -0
- README.md +73 -0
- phi-2-IQ1_M.gguf +3 -0
- phi-2-IQ1_S.gguf +3 -0
- phi-2-IQ2_M.gguf +3 -0
- phi-2-IQ2_S.gguf +3 -0
- phi-2-IQ2_XS.gguf +3 -0
- phi-2-IQ2_XXS.gguf +3 -0
- phi-2-IQ3_M.gguf +3 -0
- phi-2-IQ3_S.gguf +3 -0
- phi-2-IQ3_XS.gguf +3 -0
- phi-2-IQ3_XXS.gguf +3 -0
- phi-2-IQ4_NL.gguf +3 -0
- phi-2-IQ4_XS.gguf +3 -0
- phi-2-Q2_K.gguf +3 -0
- phi-2-Q2_K_S.gguf +3 -0
- phi-2-Q3_K_L.gguf +3 -0
- phi-2-Q3_K_M.gguf +3 -0
- phi-2-Q3_K_S.gguf +3 -0
- phi-2-Q4_0.gguf +3 -0
- phi-2-Q4_K_M.gguf +3 -0
- phi-2-Q4_K_S.gguf +3 -0
- phi-2-Q5_0.gguf +3 -0
- phi-2-Q5_K_M.gguf +3 -0
- phi-2-Q5_K_S.gguf +3 -0
- phi-2-Q6_K.gguf +3 -0
- phi-2-Q8_0.gguf +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,28 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
phi-2-IQ1_M.gguf filter=lfs diff=lfs merge=lfs -text
|
37 |
+
phi-2-IQ1_S.gguf filter=lfs diff=lfs merge=lfs -text
|
38 |
+
phi-2-IQ2_M.gguf filter=lfs diff=lfs merge=lfs -text
|
39 |
+
phi-2-IQ2_S.gguf filter=lfs diff=lfs merge=lfs -text
|
40 |
+
phi-2-IQ2_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
41 |
+
phi-2-IQ2_XXS.gguf filter=lfs diff=lfs merge=lfs -text
|
42 |
+
phi-2-IQ3_M.gguf filter=lfs diff=lfs merge=lfs -text
|
43 |
+
phi-2-IQ3_S.gguf filter=lfs diff=lfs merge=lfs -text
|
44 |
+
phi-2-IQ3_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
45 |
+
phi-2-IQ3_XXS.gguf filter=lfs diff=lfs merge=lfs -text
|
46 |
+
phi-2-IQ4_NL.gguf filter=lfs diff=lfs merge=lfs -text
|
47 |
+
phi-2-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
|
48 |
+
phi-2-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
49 |
+
phi-2-Q2_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
50 |
+
phi-2-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
51 |
+
phi-2-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
52 |
+
phi-2-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
53 |
+
phi-2-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
54 |
+
phi-2-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
55 |
+
phi-2-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
56 |
+
phi-2-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
57 |
+
phi-2-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
58 |
+
phi-2-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
59 |
+
phi-2-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
60 |
+
phi-2-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
tags:
|
7 |
+
- microsoft
|
8 |
+
- gguf
|
9 |
+
- imatrix
|
10 |
+
- phi-2
|
11 |
+
---
|
12 |
+
Quantizations of https://huggingface.co/microsoft/phi-2
|
13 |
+
|
14 |
+
# From original readme
|
15 |
+
|
16 |
+
## How to Use
|
17 |
+
|
18 |
+
Phi-2 was integrated in `transformers` version 4.37. If you need to use an earlier version, you need to pass `trust_remote_code=True` to the `from_pretrained()` function.
|
19 |
+
|
20 |
+
Phi-2 is known for having an attention overflow issue (with FP16). If you are facing this issue, please enable/disable autocast on the [PhiAttention.forward()](https://huggingface.co/microsoft/phi-2/blob/main/modeling_phi.py#L306) function.
|
21 |
+
|
22 |
+
## Intended Uses
|
23 |
+
|
24 |
+
Given the nature of the training data, the Phi-2 model is best suited for prompts using the QA format, the chat format, and the code format.
|
25 |
+
|
26 |
+
### QA Format:
|
27 |
+
|
28 |
+
You can provide the prompt as a standalone question as follows:
|
29 |
+
|
30 |
+
```markdown
|
31 |
+
Write a detailed analogy between mathematics and a lighthouse.
|
32 |
+
```
|
33 |
+
where the model generates the text after "." .
|
34 |
+
To encourage the model to write more concise answers, you can also try the following QA format using "Instruct: \<prompt\>\nOutput:"
|
35 |
+
```markdown
|
36 |
+
Instruct: Write a detailed analogy between mathematics and a lighthouse.
|
37 |
+
Output: Mathematics is like a lighthouse. Just as a lighthouse guides ships safely to shore, mathematics provides a guiding light in the world of numbers and logic. It helps us navigate through complex problems and find solutions. Just as a lighthouse emits a steady beam of light, mathematics provides a consistent framework for reasoning and problem-solving. It illuminates the path to understanding and helps us make sense of the world around us.
|
38 |
+
```
|
39 |
+
|
40 |
+
where the model generates the text after "Output:".
|
41 |
+
|
42 |
+
### Chat Format:
|
43 |
+
|
44 |
+
```markdown
|
45 |
+
Alice: I don't know why, I'm struggling to maintain focus while studying. Any suggestions?
|
46 |
+
Bob: Well, have you tried creating a study schedule and sticking to it?
|
47 |
+
Alice: Yes, I have, but it doesn't seem to help much.
|
48 |
+
Bob: Hmm, maybe you should try studying in a quiet environment, like the library.
|
49 |
+
Alice: ...
|
50 |
+
```
|
51 |
+
|
52 |
+
where the model generates the text after the first "Bob:".
|
53 |
+
|
54 |
+
### Code Format:
|
55 |
+
|
56 |
+
```python
|
57 |
+
def print_prime(n):
|
58 |
+
"""
|
59 |
+
Print all primes between 1 and n
|
60 |
+
"""
|
61 |
+
primes = []
|
62 |
+
for num in range(2, n+1):
|
63 |
+
is_prime = True
|
64 |
+
for i in range(2, int(math.sqrt(num))+1):
|
65 |
+
if num % i == 0:
|
66 |
+
is_prime = False
|
67 |
+
break
|
68 |
+
if is_prime:
|
69 |
+
primes.append(num)
|
70 |
+
print(primes)
|
71 |
+
```
|
72 |
+
|
73 |
+
where the model generates the text after the comments.
|
phi-2-IQ1_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b0153a3a86ad51716a5932a775f3c9fc4246fad336786db06977976160ab25dd
|
3 |
+
size 731863584
|
phi-2-IQ1_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d6d6eebb91c31f91a3ce028be42049c90d964b638d3d33f555658c7590ff7c86
|
3 |
+
size 685169184
|
phi-2-IQ2_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d781f116af84f7ddd479d663d931dab589842cef9104fdec8b850be4cff54164
|
3 |
+
size 1015511584
|
phi-2-IQ2_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6d0f13dbcbc6d5683c084803f46c53cfea01732131a0ecdee66792b7f19492ee
|
3 |
+
size 953252384
|
phi-2-IQ2_XS.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c552c443f30234e30267f1156fbb7dfb8091440e27ce2871e35e6733a30dd3b7
|
3 |
+
size 878500384
|
phi-2-IQ2_XXS.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:399050d80dc69e224001ec9a46085e2932a1ba5abcd49545d248ebbba03b61cb
|
3 |
+
size 809687584
|
phi-2-IQ3_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af65668eb8804b297fb64ed36cf8053c7770adebdb753dfbfc2003ceb046505e
|
3 |
+
size 1320458784
|
phi-2-IQ3_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2ac212025769159f6442dd77d0a1e5d6b5b504075075a859535e31af3d94dd4e
|
3 |
+
size 1250826784
|
phi-2-IQ3_XS.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c6fea824fb5f28f9e34162990f087990c0f9784d4385451b38789f7b65aee906
|
3 |
+
size 1201674784
|
phi-2-IQ3_XXS.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d972de176ec5d54d86ed7c7a3b1f3f6bc02dbb0803a87d074dbc2b434860e4a
|
3 |
+
size 1099069984
|
phi-2-IQ4_NL.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d3dc41b5b04d3d8cb7a1626640d4ebad540c790b25890377fb1fe07126d01ed
|
3 |
+
size 1602468384
|
phi-2-IQ4_XS.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3e02034fd2aa562b73fc868440bf81f162fd7dee947e64d5558cdaf1e880a992
|
3 |
+
size 1519729184
|
phi-2-Q2_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7408186eaeb86b0f319a6ba24183685a86c3a3965a1e43413fd4c69d3202f5c4
|
3 |
+
size 1109719584
|
phi-2-Q2_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e988869e0eee8a638d10b57f11c224352820342d5702178d132cd4cc39bef1e9
|
3 |
+
size 1006500384
|
phi-2-Q3_K_L.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c095206551a94534264338e3d49e54cb5a98c6d3b94085bc8943b5102f9c676
|
3 |
+
size 1575229984
|
phi-2-Q3_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa55a3ee3d839cd368ae5b1a5b6dab6749c535563295e3aa1423a47a658ac73d
|
3 |
+
size 1426135584
|
phi-2-Q3_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25be3677ddc162ffc9056169725043196368326a04d431144480a87196adfb0d
|
3 |
+
size 1250826784
|
phi-2-Q4_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1b033441258779373abb1fc9ca0c1a2392332f3be8871c8456179b21a896612
|
3 |
+
size 1609021984
|
phi-2-Q4_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d315424270a7791e4a4fd41c4fa01a1227519e3bb0c26eeabb4b01a528518146
|
3 |
+
size 1737636384
|
phi-2-Q4_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:be989da5b18eecd158e8603c62bb018a845a260c13818103ec489eac6b3bfd4a
|
3 |
+
size 1618852384
|
phi-2-Q5_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:984608ca3869b6d733afd1c8ed31724bd635364f72114ebf98c0e6ba087af9c6
|
3 |
+
size 1939978784
|
phi-2-Q5_K_M.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:180af441fe1396f49e2048627d58a0e846b6e21775bb4e316def8ecde5bd7aea
|
3 |
+
size 2003057184
|
phi-2-Q5_K_S.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9a14e8839eb91ed412e4bc6e5cce487e69a22f55bff7f971568e185fb584a47c
|
3 |
+
size 1933425184
|
phi-2-Q6_K.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:307faab6a19d1a3d23cb149004367db94b185af53533266f811ff4535df7830a
|
3 |
+
size 2285066784
|
phi-2-Q8_0.gguf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a736a52f8d30526ae6d4a1a2d2fd5701e7f7a2c95dc950f8ef36cd2a5adde364
|
3 |
+
size 2958039584
|