初始化项目,由ModelHub XC社区提供模型
Model: second-state/Phi-4-reasoning-GGUF Source: Original Platform
This commit is contained in:
48
.gitattributes
vendored
Normal file
48
.gitattributes
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
*.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-4-reasoning-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
Phi-4-reasoning-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
3
Phi-4-reasoning-Q2_K.gguf
Normal file
3
Phi-4-reasoning-Q2_K.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f04f0235c5de4e6ebf22e4eac49b18a92c2a3ebe1186dfe55735cbc9151e7a73
|
||||||
|
size 5547349600
|
||||||
3
Phi-4-reasoning-Q3_K_L.gguf
Normal file
3
Phi-4-reasoning-Q3_K_L.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:268c19f4e21cc42c7ab13f1946c3bf81a5a444b2242d1672387edce17b48fcaa
|
||||||
|
size 7930156640
|
||||||
3
Phi-4-reasoning-Q3_K_M.gguf
Normal file
3
Phi-4-reasoning-Q3_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:945fb0456910e90f2696b341ff505f6d900ba5b4e3933fd97016b8129a349744
|
||||||
|
size 7363270240
|
||||||
3
Phi-4-reasoning-Q3_K_S.gguf
Normal file
3
Phi-4-reasoning-Q3_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a207b668c2f7cce5a5764f38a0d1df666f08131cde12ef33e46478fba3ab6176
|
||||||
|
size 6504748640
|
||||||
3
Phi-4-reasoning-Q4_0.gguf
Normal file
3
Phi-4-reasoning-Q4_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9c0c1f5ff23ff518c5703b253a872d442bfd7c664fe1ba098bd6273917d25f0d
|
||||||
|
size 8383420000
|
||||||
3
Phi-4-reasoning-Q4_K_M.gguf
Normal file
3
Phi-4-reasoning-Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:40fb402c2467e58d16992c36b8608afa5331f0ba4ec68d689198cfd9f68f308e
|
||||||
|
size 9053116000
|
||||||
3
Phi-4-reasoning-Q4_K_S.gguf
Normal file
3
Phi-4-reasoning-Q4_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d2fe85361d7dc725f9e3d43c5252aa94d85731525851c231c91f2648909e52cb
|
||||||
|
size 8440764000
|
||||||
3
Phi-4-reasoning-Q5_0.gguf
Normal file
3
Phi-4-reasoning-Q5_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:da5367a01e3ec34dfb0de24211aebb04e52d600a5e2f8e1cd883a954a338fa67
|
||||||
|
size 10151581280
|
||||||
3
Phi-4-reasoning-Q5_K_M.gguf
Normal file
3
Phi-4-reasoning-Q5_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:31f54e92b3ace51afa0910366dc85ff468d40d77606edc8069b0df2b652d2437
|
||||||
|
size 10604189280
|
||||||
3
Phi-4-reasoning-Q5_K_S.gguf
Normal file
3
Phi-4-reasoning-Q5_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b85a9959d55efe07e1a258af65b5cded300fb8a99860a0a367a5643863000361
|
||||||
|
size 10151581280
|
||||||
3
Phi-4-reasoning-Q6_K.gguf
Normal file
3
Phi-4-reasoning-Q6_K.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8f4344e0be97d361e19f8f54335401090570219e983c04ad195ef79155586bef
|
||||||
|
size 12030252640
|
||||||
3
Phi-4-reasoning-Q8_0.gguf
Normal file
3
Phi-4-reasoning-Q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7163a8b91deae1a002221b996cd539624c41b13b22b413d1a43ef4e857d035e3
|
||||||
|
size 15580501600
|
||||||
3
Phi-4-reasoning-f16.gguf
Normal file
3
Phi-4-reasoning-f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:256d9c398cb7ba4aa787fa2de7db4f983c7d7b5cc0d1086928605b423286ce4e
|
||||||
|
size 29323400800
|
||||||
88
README.md
Normal file
88
README.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
license: mit
|
||||||
|
license_link: https://huggingface.co/microsoft/Phi-4-reasoning/resolve/main/LICENSE
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
base_model:
|
||||||
|
- microsoft/phi-4
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
library_name: transformers
|
||||||
|
model_creator: Microsoft
|
||||||
|
model_name: Phi-4-reasoning
|
||||||
|
quantized_by: Second State Inc.
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- header start -->
|
||||||
|
<!-- 200823 -->
|
||||||
|
<div style="width: auto; margin-left: auto; margin-right: auto">
|
||||||
|
<img src="https://github.com/LlamaEdge/LlamaEdge/raw/dev/assets/logo.svg" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
||||||
|
</div>
|
||||||
|
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
||||||
|
<!-- header end -->
|
||||||
|
|
||||||
|
# Phi-4-reasoning-GGUF
|
||||||
|
|
||||||
|
## Original Model
|
||||||
|
|
||||||
|
[microsoft/Phi-4-reasoning](https://huggingface.co/microsoft/Phi-4-reasoning)
|
||||||
|
|
||||||
|
## Run with LlamaEdge
|
||||||
|
|
||||||
|
- LlamaEdge version: coming soon
|
||||||
|
|
||||||
|
<!-- - LlamaEdge version: [v0.16.0](https://github.com/LlamaEdge/LlamaEdge/releases/tag/0.16.0) and above -->
|
||||||
|
|
||||||
|
- Prompt template
|
||||||
|
|
||||||
|
- Prompt type: `phi-4-chat`
|
||||||
|
|
||||||
|
- Prompt string
|
||||||
|
|
||||||
|
```text
|
||||||
|
<|im_start|>system<|im_sep|>
|
||||||
|
{system_message}<|im_end|>
|
||||||
|
<|im_start|>user<|im_sep|>
|
||||||
|
{user_message}<|im_end|>
|
||||||
|
<|im_start|>assistant<|im_sep|>
|
||||||
|
```
|
||||||
|
|
||||||
|
- Context size: `32000`
|
||||||
|
|
||||||
|
- Run as LlamaEdge service
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wasmedge --dir .:. --nn-preload default:GGML:AUTO:Phi-4-reasoning-Q5_K_M.gguf \
|
||||||
|
llama-api-server.wasm \
|
||||||
|
--prompt-template phi-4-chat \
|
||||||
|
--ctx-size 32000 \
|
||||||
|
--model-name phi-4-reasoning
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run as LlamaEdge command app
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wasmedge --dir .:. --nn-preload default:GGML:AUTO:Phi-4-reasoning-Q5_K_M.gguf \
|
||||||
|
llama-chat.wasm \
|
||||||
|
--prompt-template phi-4-chat \
|
||||||
|
--ctx-size 32000
|
||||||
|
```
|
||||||
|
|
||||||
|
## Quantized GGUF Models
|
||||||
|
|
||||||
|
| Name | Quant method | Bits | Size | Use case |
|
||||||
|
| ---- | ---- | ---- | ---- | ----- |
|
||||||
|
| [Phi-4-reasoning-Q2_K.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q2_K.gguf) | Q2_K | 2 | 5.55 GB| smallest, significant quality loss - not recommended for most purposes |
|
||||||
|
| [Phi-4-reasoning-Q3_K_L.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q3_K_L.gguf) | Q3_K_L | 3 | 7.93 GB| small, substantial quality loss |
|
||||||
|
| [Phi-4-reasoning-Q3_K_M.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q3_K_M.gguf) | Q3_K_M | 3 | 7.36 GB| very small, high quality loss |
|
||||||
|
| [Phi-4-reasoning-Q3_K_S.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q3_K_S.gguf) | Q3_K_S | 3 | 6.50 GB| very small, high quality loss |
|
||||||
|
| [Phi-4-reasoning-Q4_0.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q4_0.gguf) | Q4_0 | 4 | 8.38 GB| legacy; small, very high quality loss - prefer using Q3_K_M |
|
||||||
|
| [Phi-4-reasoning-Q4_K_M.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q4_K_M.gguf) | Q4_K_M | 4 | 9.05 GB| medium, balanced quality - recommended |
|
||||||
|
| [Phi-4-reasoning-Q4_K_S.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q4_K_S.gguf) | Q4_K_S | 4 | 8.44 GB| small, greater quality loss |
|
||||||
|
| [Phi-4-reasoning-Q5_0.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q5_0.gguf) | Q5_0 | 5 | 10.2 GB| legacy; medium, balanced quality - prefer using Q4_K_M |
|
||||||
|
| [Phi-4-reasoning-Q5_K_M.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q5_K_M.gguf) | Q5_K_M | 5 | 10.6 GB| large, very low quality loss - recommended |
|
||||||
|
| [Phi-4-reasoning-Q5_K_S.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q5_K_S.gguf) | Q5_K_S | 5 | 10.2 GB| large, low quality loss - recommended |
|
||||||
|
| [Phi-4-reasoning-Q6_K.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q6_K.gguf) | Q6_K | 6 | 12.0 GB| very large, extremely low quality loss |
|
||||||
|
| [Phi-4-reasoning-Q8_0.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-Q8_0.gguf) | Q8_0 | 8 | 15.6 GB| very large, extremely low quality loss - not recommended |
|
||||||
|
| [Phi-4-reasoning-f16.gguf](https://huggingface.co/second-state/Phi-4-reasoning-GGUF/blob/main/Phi-4-reasoning-f16.gguf) | f16 | 16 | 29.3 GB| |
|
||||||
|
|
||||||
|
*Quantized with llama.cpp b5201.*
|
||||||
32
config.json
Normal file
32
config.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Phi3ForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 100257,
|
||||||
|
"embd_pdrop": 0.0,
|
||||||
|
"eos_token_id": 100265,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 5120,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 17920,
|
||||||
|
"max_position_embeddings": 32768,
|
||||||
|
"model_type": "phi3",
|
||||||
|
"num_attention_heads": 40,
|
||||||
|
"num_hidden_layers": 40,
|
||||||
|
"num_key_value_heads": 10,
|
||||||
|
"original_max_position_embeddings": 32768,
|
||||||
|
"pad_token_id": 100349,
|
||||||
|
"partial_rotary_factor": 1.0,
|
||||||
|
"resid_pdrop": 0.0,
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_scaling": null,
|
||||||
|
"rope_theta": 500000,
|
||||||
|
"sliding_window": null,
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"torch_dtype": "bfloat16",
|
||||||
|
"transformers_version": "4.51.1",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 100352
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user