初始化项目,由ModelHub XC社区提供模型

Model: thesven/Phi-3-medium-128k-instruct-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-09-05 23:54:16 +08:00
commit f19b74ab01
25 changed files with 290 additions and 0 deletions

58
.gitattributes vendored Normal file
View File

@@ -0,0 +1,58 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ1_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ2_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ2_XS.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ3_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ3_XXS.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ4_NL.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q3_K.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q4_1.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q4_K.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q5_1.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q5_K.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
Phi-3-medium-128k-instruct-GGUF-bf16.gguf filter=lfs diff=lfs merge=lfs -text

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d78113ebe37d40fd54666759a809922c8cb4fbd832d9ca8bb0cc1bf2b90b1f2f
size 2957997024

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c1d5d670ebdc1aa53f1b12abc766837b641f61eb3f977b39a23671980247684
size 4338126304

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:721ac9f5e435239824ad6c3ea762668321f6ad6de781d0dfc26c0d4dfc2f6ccc
size 4127405024

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:25820243fc75e5464cc8019d26c6864728fdda66d9a72c518d5fa1b029ab268e
size 6064889824

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f45d45fc21a4ee66d779602d30074d99c3b7f4ebeab9d980612a383ae1fb8c0
size 5453262304

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8538dde5de3e4b2831392af43b91aa43f8d046470dd2d38fb4abab7f39357c94
size 7897125344

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:460b1cf8a5c7d5ceac67d154d38b23dbde83a108e07208505dafd6717adff781
size 7466011104

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e7ec84303179d6f7fe73185ef27381b87afc876a26f033c2686eb07e0e8d0fd2
size 5143000320

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:817b3770427ca5bba0eb4a0a13a15bdcf3bd2d22fe7cb6b82baf935b70af8d9b
size 6923411200

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b81cfcfbcc69858de2c44991e18d0adecb8111164ab03d70eab8bc46e98f83ec
size 6064889600

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e45624c8276178d1802dffcb5f683ebf0a6a9dcfdf1b62b82fe5bbbdd2f59c93
size 7897125120

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bae75cf69355c0027fa4fa69dd914360cf74dfc732d3e066d5294d34dfc0421
size 8759353600

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77a17946f93b2f0a98531f1d361f5a85d646cbc00715c60067e1509be9ce304e
size 8566821120

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77a17946f93b2f0a98531f1d361f5a85d646cbc00715c60067e1509be9ce304e
size 8566821120

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:50337a1b10e7c3c6f8e8a5617ec63887be7fe925c1eb67b661085c3c5f1e0dd0
size 7954469120

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4efde11dde5b6d8e3bf56b9dcfac7ffdbedbf63b0bd8b7bd11da29368cb2a885
size 9621582080

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:12375d1dee7f4894fb5cbde119a5f397667357ab64a338cead297344c5825707
size 10483810560

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa9f5542bbeec685ed624f5cf13c64805e2f58771fa5abdb5e59fddfac3760e0
size 10074190080

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa9f5542bbeec685ed624f5cf13c64805e2f58771fa5abdb5e59fddfac3760e0
size 10074190080

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac6c587de96419673833b1cb3d718fd72c4b84bf35f894785c74273c7c3acc55
size 9621582080

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b65eb05a6c61a7c1b87bb720d33067f53feb793e7fca081786b5b4e1f73e06c
size 11453817600

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66018dde2bc97cb092de6eb9804ac7cca6b665e91ad9a6e2fad808dcc75add11
size 14834712320

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c82493237cbb1b4f3130e9611c6e0221c8e6d3799dd8d8c1ae9b9f2e9d8bc98d
size 27922046720

163
README.md Normal file
View File

@@ -0,0 +1,163 @@
---
license: mit
license_link: https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/resolve/main/LICENSE
language:
- en
pipeline_tag: text-generation
tags:
- nlp
- code
widget:
- messages:
- role: user
content: Can you provide ways to eat combinations of bananas and dragonfruits?
---
## Description
This repo contains GGUF quantized versions of the Microsoft Phi 3 medium 128k instruct model. They are supplied in different quantizations so that you can see what works best on the hardware you would like to run it on.
The repo contains quantizations in the following types:
- Q4_0
- Q4_1
- Q4_K
- Q4_K_S
- Q4_K_M
- Q5_0
- Q5_1
- Q5_K
- Q5_K_M
- Q5_K_S
- Q6_K
- Q8_0
- Q2_K
- Q3_K
- Q3_K_S
- Q3_K_XS
- IQ2_K
- IQ3_S
- IQ3_XXS
- IQ4_NL
- IQ4_XS
- IQ5_K
- IQ2_S
- IQ2_XS
- IQ1_S
<div style="text-align: center;">
<a href="https://github.com/thesven/GGUF-n-Go">
<img src="https://github.com/thesven/GGUF-n-Go/blob/main/assets/quantized_with.png?raw=true" alt="image/png" style="max-width: 350px;">
</a>
</div>
## Model Summary
The Phi-3-Mini-128K-Instruct is a 3.8 billion-parameter, lightweight, state-of-the-art open model trained using the Phi-3 datasets.
This dataset includes both synthetic data and filtered publicly available website data, with an emphasis on high-quality and reasoning-dense properties.
The model belongs to the Phi-3 family with the Mini version in two variants [4K](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) and [128K](https://huggingface.co/microsoft/Phi-3-mini-128k-instruct) which is the context length (in tokens) that it can support.
After initial training, the model underwent a post-training process that involved supervised fine-tuning and direct preference optimization to enhance its ability to follow instructions and adhere to safety measures.
When evaluated against benchmarks that test common sense, language understanding, mathematics, coding, long-term context, and logical reasoning, the Phi-3 Mini-128K-Instruct demonstrated robust and state-of-the-art performance among models with fewer than 13 billion parameters.
Resources and Technical Documentation:
+ [Phi-3 Microsoft Blog](https://aka.ms/phi3blog-april)
+ [Phi-3 Technical Report](https://aka.ms/phi3-tech-report)
+ [Phi-3 on Azure AI Studio](https://aka.ms/phi3-azure-ai)
+ Phi-3 ONNX: [128K](https://aka.ms/Phi3-mini-128k-instruct-onnx)
## Intended Uses
**Primary use cases**
The model is intended for commercial and research use in English. The model provides uses for applications which require:
1) Memory/compute constrained environments
2) Latency bound scenarios
3) Strong reasoning (especially code, math and logic)
Our model is designed to accelerate research on language and multimodal models, for use as a building block for generative AI powered features.
**Use case considerations**
Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fariness before using within a specific downstream use case, particularly for high risk scenarios. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case.
Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.
### Tokenizer
Phi-3 Mini-128K-Instruct supports a vocabulary size of up to `32064` tokens. The [tokenizer files](https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/blob/main/added_tokens.json) already provide placeholder tokens that can be used for downstream fine-tuning, but they can also be extended up to the model's vocabulary size.
### Chat Format
Given the nature of the training data, the Phi-3 Mini-128K-Instruct model is best suited for prompts using the chat format as follows.
You can provide the prompt as a question with a generic template as follow:
```markdown
<|user|>\nQuestion<|end|>\n<|assistant|>
```
For example:
```markdown
<|user|>
How to explain Internet for a medieval knight?<|end|>
<|assistant|>
```
where the model generates the text after `<|assistant|>`. In case of few-shots prompt, the prompt can be formatted as the following:
```markdown
<|user|>
I am going to Paris, what should I see?<|end|>
<|assistant|>
Paris, the capital of France, is known for its stunning architecture, art museums, historical landmarks, and romantic atmosphere. Here are some of the top attractions to see in Paris:\n\n1. The Eiffel Tower: The iconic Eiffel Tower is one of the most recognizable landmarks in the world and offers breathtaking views of the city.\n2. The Louvre Museum: The Louvre is one of the world's largest and most famous museums, housing an impressive collection of art and artifacts, including the Mona Lisa.\n3. Notre-Dame Cathedral: This beautiful cathedral is one of the most famous landmarks in Paris and is known for its Gothic architecture and stunning stained glass windows.\n\nThese are just a few of the many attractions that Paris has to offer. With so much to see and do, it's no wonder that Paris is one of the most popular tourist destinations in the world."<|end|>
<|user|>
What is so great about #1?<|end|>
<|assistant|>
```
## Responsible AI Considerations
Like other language models, the Phi series models can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include:
+ Quality of Service: the Phi models are trained primarily on English text. Languages other than English will experience worse performance. English language varieties with less representation in the training data might experience worse performance than standard American English.
+ Representation of Harms & Perpetuation of Stereotypes: These models can over- or under-represent groups of people, erase representation of some groups, or reinforce demeaning or negative stereotypes. Despite safety post-training, these limitations may still be present due to differing levels of representation of different groups or prevalence of examples of negative stereotypes in training data that reflect real-world patterns and societal biases.
+ Inappropriate or Offensive Content: these models may produce other types of inappropriate or offensive content, which may make it inappropriate to deploy for sensitive contexts without additional mitigations that are specific to the use case.
+ Information Reliability: Language models can generate nonsensical content or fabricate content that might sound reasonable but is inaccurate or outdated.
+ Limited Scope for Code: Majority of Phi-3 training data is based in Python and use common packages such as "typing, math, random, collections, datetime, itertools". If the model generates Python scripts that utilize other packages or scripts in other languages, we strongly recommend users manually verify all API uses.
Developers should apply responsible AI best practices and are responsible for ensuring that a specific use case complies with relevant laws and regulations (e.g. privacy, trade, etc.). Important areas for consideration include:
+ Allocation: Models may not be suitable for scenarios that could have consequential impact on legal status or the allocation of resources or life opportunities (ex: housing, employment, credit, etc.) without further assessments and additional debiasing techniques.
+ High-Risk Scenarios: Developers should assess suitability of using models in high-risk scenarios where unfair, unreliable or offensive outputs might be extremely costly or lead to harm. This includes providing advice in sensitive or expert domains where accuracy and reliability are critical (ex: legal or health advice). Additional safeguards should be implemented at the application level according to the deployment context.
+ Misinformation: Models may produce inaccurate information. Developers should follow transparency best practices and inform end-users they are interacting with an AI system. At the application level, developers can build feedback mechanisms and pipelines to ground responses in use-case specific, contextual information, a technique known as Retrieval Augmented Generation (RAG).
+ Generation of Harmful Content: Developers should assess outputs for their context and use available safety classifiers or custom solutions appropriate for their use case.
+ Misuse: Other forms of misuse such as fraud, spam, or malware production may be possible, and developers should ensure that their applications do not violate applicable laws and regulations.
## Training
### Model
* Architecture: Phi-3 Mini-128K-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.
* Inputs: Text. It is best suited for prompts using chat format.
* Context length: 128K tokens
* GPUs: 512 H100-80G
* Training time: 7 days
* Training data: 3.3T tokens
* Outputs: Generated text in response to the input
* Dates: Our models were trained between February and April 2024
* Status: This is a static model trained on an offline dataset with cutoff date October 2023. Future versions of the tuned models may be released as we improve models.
### Datasets
Our training data includes a wide variety of sources, totaling 3.3 trillion tokens, and is a combination of
1) Publicly available documents filtered rigorously for quality, selected high-quality educational data, and code;
2) 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.);
3) High quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness.
## License
The model is licensed under the [MIT license](https://huggingface.co/microsoft/Phi-3-mini-128k/resolve/main/LICENSE).
## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.