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

Model: tletai/phi-4-mini-instruct-4b-usm-tau-py-0003
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-18 04:06:16 +08:00
commit 3c647f199b
12 changed files with 334 additions and 0 deletions

43
.gitattributes vendored Normal file
View File

@@ -0,0 +1,43 @@
*.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-mini-instruct.Q2_K_L.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.BF16.gguf filter=lfs diff=lfs merge=lfs -text
phi-4-mini-instruct.F16.gguf filter=lfs diff=lfs merge=lfs -text

16
Modelfile Normal file
View File

@@ -0,0 +1,16 @@
FROM phi-4-mini-instruct.F16.gguf
TEMPLATE """{{- if or .System .Tools }}<|system|>{{ if .System }}{{ .System }}{{ end }}
{{- if .Tools }}{{ if not .System }}You are a helpful assistant with some tools.{{ end }}<|tool|>{{ .Tools }}<|/tool|><|end|>
{{- end }}
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if ne .Role "system" }}<|{{ .Role }}|>{{ .Content }}
{{- if .ToolCalls }}<|tool_call|>[{{ range .ToolCalls }}{"name":"{{ .Function.Name }}","arguments":{{ .Function.Arguments }}{{ end }}]<|/tool_call|>
{{- end }}
{{- if not $last }}<|end|>
{{- end }}
{{- if and (ne .Role "assistant") $last }}<|end|><|assistant|>{{ end }}
{{- end }}
{{- end }}"""

106
README.md Normal file
View File

@@ -0,0 +1,106 @@
---
tags:
- gguf
- llama.cpp
- unsloth
- ollama
- phi4
- phi-4
- phi-4-mini
- phi4mini
- phi-4mini
- 4b
- python
- code
- coder
- python-code
- tlet-ai
- tlet
datasets:
- iamtarun/python_code_instructions_18k_alpaca
language:
- en
base_model:
- unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit
pipeline_tag: text-generation
license: mit
---
# phi-4-mini-instruct-4b-usm-tau-py-0003 (GGUF)
<center><img src="https://cdn-uploads.huggingface.co/production/uploads/695d0e4f802fc1b162e79766/wahq-sptk6-jyXU2KLh-h.png" width="600px"/></center>
## Internal Model Name: Tau0-Py-003-4B-ir
**Explaining how TLET AI public & internal model names work:**
- Public Model Name: **{basemodel}**-**{parameters}**-**{type}**-**{series}**-**{hyperspecialization (when USM type)}**-**{release type number}{versioning number (digits are 3x what release type number digits are)}**
- So: **phi-4-mini-instruct-4b-usm-tau-py-0003** means:
- - **Base:** phi-4-mini-instruct (specifically [unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit))
- **Parameters:** 4 Billion
- **Type:** USM (Ultra Specialized Model)
- **Series:** Tau (Proof of Concept model series)
- **Hyperspecialization (is USM):** Python
- **Release Type:** 0, Proof of Concept/Early Works stage
- **Release Version:** 003, this is the 3rd model in the Tau series of models (includes fine-tunes that come from other base models.)
- Internal/Private Model Name: **{series}{release type number}**-**{hyperspecialization}**-**{versioning number (digits are 3x what release type number digits are)}**-**{parameters}**-**{ir IF model is Inference Ready (Ollama)}**
- So: **Tau0-Py-003-4B-ir** means:
- - **Series:** Tau (Proof of Concept model series)
- **Release Type:** 0, Proof of Concept/Early Works stage
- **Hyperspecialization (is USM):** Python
- **Release Version:** 003, this is the 3rd model in the Tau series of models (includes fine-tunes that come from other base models.)
- **Is inference ready.**
## Ollama Commands (with recommended Q5_K_M quantization)
### Pull
```
ollama pull hf.co/tletai/phi-4-mini-instruct-4b-usm-tau-py-0003:Q5_K_M
```
### Run Command
```
ollama run hf.co/tletai/phi-4-mini-instruct-4b-usm-tau-py-0003:Q5_K_M
```
### Aliasing
While you are running it, you can run the following command to save it with it's much simpler internal name for ease of use via Ollama. (This command should be ran AFTER running `ollama run`, meaning, when you are already chatting with the model in the CLI.)
```
>>> /save tau0-py-003-4B-ir:Q5_K_M
```
This will allow you to run it using this command instead:
```
ollama run tau0-py-003-4B-ir:Q5_K_M
```
You can remove parts you don't want, such as "-4B-ir" or ":Q5_K_M" (which isn't really needed if you're just planning on downloading a single quantization anyways) from the /save command as you wish.
### Deleting Aliases
This command will remove the alias **but keep the model**:
```
ollama rm tau0-py-003-4B-ir:Q5_K_M
```
### Complete Deletion
To fully remove the model, remove all aliases and also remove the original pull:
```
ollama rm hf.co/tletai/phi-4-mini-instruct-4b-usm-tau-py-0003:Q5_K_M
```
## Fine-tuning
- Base model: [unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit)
- Done using **QLoRA**, **Paged AdamW 32-bit** with an **8K Context Length** on an **NVidia RTX 3060 Ti (8GB VRAM)** for **6h47m** at about **~112W** power draw for most of the time, with occassional hike-ups to at-most **217W** (of therotical possible 225W.)
- Tokens during training: **4699303**.
- Epochs completed: **1.33** (67% of 2 target epochs, runtime got too long for proof of concept, so it was cancelled. Steps for more precise, in our config: 3099/4654.)
- Done using [**Unsloth Studio**](https://unsloth.ai/docs/new/studio), which largely increased training efficency and speed.
- If you need specifics for research purposes, possible collaboration, fine-tuning a model yourself or are just curious, feel free to reach out. **We do not have specific, timed power usage data anymore. It was discarded immediately after it was used, do not ask for it.**
### System Specifications
- `CPU` `1x` i9-12900KF
- `RAM` `4x` 16GB of RAM (DDR4, 3600MHz)
- - `TOTAL` 64GB of RAM (DDR4, 3600MHz)
- `GPUS`
- - `1x` NVIDIA GeForce RTX 3060 Ti (8GB of VRAM)
- `OS` Windows 10 Native
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)

145
config.json Normal file
View File

@@ -0,0 +1,145 @@
{
"architectures": [
"Phi3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"auto_map": {
"AutoConfig": "configuration_phi3.Phi3Config",
"AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM",
"AutoTokenizer": "Xenova/gpt-4o"
},
"bos_token_id": 199999,
"torch_dtype": "bfloat16",
"embd_pdrop": 0.0,
"eos_token_id": 200020,
"full_attn_mod": 1,
"hidden_act": "silu",
"hidden_size": 3072,
"initializer_range": 0.02,
"intermediate_size": 8192,
"interpolate_factor": 1,
"lm_head_bias": false,
"max_position_embeddings": 131072,
"mlp_bias": false,
"model_name": "unsloth/Phi-4-mini-instruct-unsloth-bnb-4bit",
"model_type": "phi3",
"num_attention_heads": 24,
"num_hidden_layers": 32,
"num_key_value_heads": 8,
"original_max_position_embeddings": 4096,
"pad_token_id": 200029,
"partial_rotary_factor": 0.75,
"resid_pdrop": 0.0,
"rms_norm_eps": 1e-05,
"rope_scaling": {
"long_factor": [
1,
1.118320672,
1.250641126,
1.398617824,
1.564103225,
1.74916897,
1.956131817,
2.187582649,
2.446418898,
2.735880826,
3.059592084,
3.421605075,
3.826451687,
4.279200023,
4.785517845,
5.351743533,
5.984965424,
6.693110555,
7.485043894,
8.370679318,
9.36110372,
10.4687158,
11.70738129,
13.09260651,
14.64173252,
16.37415215,
18.31155283,
20.47818807,
22.90118105,
25.61086418,
28.64115884,
32.03,
32.1,
32.13,
32.23,
32.6,
32.61,
32.64,
32.66,
32.7,
32.71,
32.93,
32.97,
33.28,
33.49,
33.5,
44.16,
47.77
],
"short_factor": [
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"type": "longrope"
},
"rope_theta": 10000.0,
"sliding_window": 262144,
"tie_word_embeddings": true,
"unsloth_fixed": true,
"unsloth_version": "2026.4.8",
"use_cache": true,
"vocab_size": 200064
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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