初始化项目,由ModelHub XC社区提供模型
Model: second-state/Phi-3-medium-4k-instruct-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-3-medium-4k-instruct-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
Phi-3-medium-4k-instruct-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
3
Phi-3-medium-4k-instruct-Q2_K.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q2_K.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ae5584d5e850801c4f32fee2b1171c05eaa1f9925889555b3c83eda9970a20c7
|
||||
size 5142999648
|
||||
3
Phi-3-medium-4k-instruct-Q3_K_L.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q3_K_L.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dfa511d6c9c7f29b6fccd2fa7c80374396fbd72fda096dcc551ac358b8d1d377
|
||||
size 7490296928
|
||||
3
Phi-3-medium-4k-instruct-Q3_K_M.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q3_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:314bce75c1425616d504fe1bb9a891a29541d56d11b2763aa50932d7b6ac1f00
|
||||
size 6923410528
|
||||
3
Phi-3-medium-4k-instruct-Q3_K_S.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q3_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d66067b17b01c6571de933bb34cfe6c99745c0495821119e0b6f4a47e6fbf6a8
|
||||
size 6064888928
|
||||
3
Phi-3-medium-4k-instruct-Q4_0.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q4_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cdeeec065542176eb30cfb3594faf069cddd93220d1faa23c39dac45d6debfef
|
||||
size 7897124448
|
||||
3
Phi-3-medium-4k-instruct-Q4_K_M.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f74f6ffa9b019f43f05677d73f357aa8bbebdb2b6ecc3e9f19443c6c4c654982
|
||||
size 8566820448
|
||||
3
Phi-3-medium-4k-instruct-Q4_K_S.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q4_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7c37a6c54c6e36d90bff62b9da4dc339bcf9335585a1364cf361d74d742b6de
|
||||
size 7954468448
|
||||
3
Phi-3-medium-4k-instruct-Q5_0.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q5_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:69f445433d2fd906728a55ef87a32bce680145a47f0f0a37dfd6d5964475507b
|
||||
size 9621581408
|
||||
3
Phi-3-medium-4k-instruct-Q5_K_M.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q5_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4a6cbc460f21a6d43ea4c21e177c24db566bff26206e012d700c91798819c21
|
||||
size 10074189408
|
||||
3
Phi-3-medium-4k-instruct-Q5_K_S.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q5_K_S.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f50b1c4d9fa3085a67d0d567f75a1dd8982389f733c7af2351ab18487697bd3
|
||||
size 9621581408
|
||||
3
Phi-3-medium-4k-instruct-Q6_K.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q6_K.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a77798707e52b68647f84675b3d7ba673d36616d19f7b5b5b3de65dff5c072da
|
||||
size 11453816928
|
||||
3
Phi-3-medium-4k-instruct-Q8_0.gguf
Normal file
3
Phi-3-medium-4k-instruct-Q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:27751464b5a6cccc2eae0efefd443aca688fc911fb9a52948798b83ad2c90150
|
||||
size 14834711648
|
||||
3
Phi-3-medium-4k-instruct-f16.gguf
Normal file
3
Phi-3-medium-4k-instruct-f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:51a8dedc7dfd08a58fb06d4066b9822f434d356681bd51dbe5c8c1489e892399
|
||||
size 27922046048
|
||||
92
README.md
Normal file
92
README.md
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
base_model: microsoft/Phi-3-medium-4k-instruct
|
||||
license: mit
|
||||
license_link: https://huggingface.co/microsoft/Phi-3-medium-4k-instruct/resolve/main/LICENSE
|
||||
language:
|
||||
- multilingual
|
||||
pipeline_tag: text-generation
|
||||
model_creator: Microsoft
|
||||
model_name: Phi 3 medium 4k instruct
|
||||
model_type: phi-msft
|
||||
quantized_by: Second State Inc.
|
||||
tags:
|
||||
- nlp
|
||||
- code
|
||||
---
|
||||
|
||||
<!-- 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-3-medium-4k-instruct-GGUF
|
||||
|
||||
## Original Model
|
||||
|
||||
[microsoft/Phi-3-medium-4k-instruct](https://huggingface.co/microsoft/Phi-3-medium-4k-instruct)
|
||||
|
||||
## Run with LlamaEdge
|
||||
|
||||
- LlamaEdge version: [v0.11.2](https://github.com/LlamaEdge/LlamaEdge/releases/tag/0.11.2) and above
|
||||
|
||||
- Prompt template
|
||||
|
||||
- Prompt type: `phi-3-chat`
|
||||
|
||||
- Prompt string
|
||||
|
||||
```text
|
||||
<|system|>
|
||||
{system_message}<|end|>
|
||||
<|user|>
|
||||
{user_message_1}<|end|>
|
||||
<|assistant|>
|
||||
{assistant_message_1}<|end|>
|
||||
<|user|>
|
||||
{user_message_2}<|end|>
|
||||
<|assistant|>
|
||||
```
|
||||
|
||||
- Context size: `4000`
|
||||
|
||||
- Run as LlamaEdge service
|
||||
|
||||
```bash
|
||||
wasmedge --dir .:. --nn-preload default:GGML:AUTO:Phi-3-medium-4k-instruct-Q5_K_M.gguf \
|
||||
llama-api-server.wasm \
|
||||
--prompt-template phi-3-chat \
|
||||
--ctx-size 4000 \
|
||||
--model-name phi-3-medium-4k
|
||||
```
|
||||
|
||||
- Run as LlamaEdge command app
|
||||
|
||||
```bash
|
||||
wasmedge --dir .:. --nn-preload default:GGML:AUTO:Phi-3-medium-4k-instruct-Q5_K_M.gguf \
|
||||
llama-chat.wasm \
|
||||
--prompt-template phi-3-chat \
|
||||
--ctx-size 4000
|
||||
```
|
||||
|
||||
## Quantized GGUF Models
|
||||
|
||||
| Name | Quant method | Bits | Size | Use case |
|
||||
| ---- | ---- | ---- | ---- | ----- |
|
||||
| [Phi-3-medium-4k-instruct-Q2_K.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q2_K.gguf) | Q2_K | 2 | 5.14 GB| smallest, significant quality loss - not recommended for most purposes |
|
||||
| [Phi-3-medium-4k-instruct-Q3_K_L.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q3_K_L.gguf) | Q3_K_L | 3 | 7.49 GB| small, substantial quality loss |
|
||||
| [Phi-3-medium-4k-instruct-Q3_K_M.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q3_K_M.gguf) | Q3_K_M | 3 | 6.92 GB| very small, high quality loss |
|
||||
| [Phi-3-medium-4k-instruct-Q3_K_S.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q3_K_S.gguf) | Q3_K_S | 3 | 6.06 GB| very small, high quality loss |
|
||||
| [Phi-3-medium-4k-instruct-Q4_0.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q4_0.gguf) | Q4_0 | 4 | 7.9 GB| legacy; small, very high quality loss - prefer using Q3_K_M |
|
||||
| [Phi-3-medium-4k-instruct-Q4_K_M.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q4_K_M.gguf) | Q4_K_M | 4 | 8.57 GB| medium, balanced quality - recommended |
|
||||
| [Phi-3-medium-4k-instruct-Q4_K_S.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q4_K_S.gguf) | Q4_K_S | 4 | 7.95 GB| small, greater quality loss |
|
||||
| [Phi-3-medium-4k-instruct-Q5_0.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q5_0.gguf) | Q5_0 | 5 | 9.62 GB| legacy; medium, balanced quality - prefer using Q4_K_M |
|
||||
| [Phi-3-medium-4k-instruct-Q5_K_M.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q5_K_M.gguf) | Q5_K_M | 5 | 10.1 GB| large, very low quality loss - recommended |
|
||||
| [Phi-3-medium-4k-instruct-Q5_K_S.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q5_K_S.gguf) | Q5_K_S | 5 | 9.62 GB| large, low quality loss - recommended |
|
||||
| [Phi-3-medium-4k-instruct-Q6_K.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q6_K.gguf) | Q6_K | 6 | 11.5 GB| very large, extremely low quality loss |
|
||||
| [Phi-3-medium-4k-instruct-Q8_0.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-Q8_0.gguf) | Q8_0 | 8 | 14.8 GB| very large, extremely low quality loss - not recommended |
|
||||
| [Phi-3-medium-4k-instruct-f16.gguf](https://huggingface.co/second-state/Phi-3-medium-4k-instruct-GGUF/blob/main/Phi-3-medium-4k-instruct-f16.gguf) | f16 | 16 | 27.9 GB| |
|
||||
|
||||
*Quantized with llama.cpp b2961.*
|
||||
35
config.json
Normal file
35
config.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"_name_or_path": "Phi-3-medium-4k-instruct",
|
||||
"architectures": [
|
||||
"Phi3ForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"auto_map": {
|
||||
"AutoConfig": "configuration_phi3.Phi3Config",
|
||||
"AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM"
|
||||
},
|
||||
"bos_token_id": 1,
|
||||
"embd_pdrop": 0.0,
|
||||
"eos_token_id": 32000,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 5120,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 17920,
|
||||
"max_position_embeddings": 4096,
|
||||
"model_type": "phi3",
|
||||
"num_attention_heads": 40,
|
||||
"num_hidden_layers": 40,
|
||||
"num_key_value_heads": 10,
|
||||
"original_max_position_embeddings": 4096,
|
||||
"pad_token_id": 32000,
|
||||
"resid_pdrop": 0.0,
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"sliding_window": 2047,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.39.3",
|
||||
"use_cache": true,
|
||||
"vocab_size": 32064
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||
Reference in New Issue
Block a user