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

Model: Shinzmann/naija-petro-8b-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-11 04:22:16 +08:00
commit d302c9ab39
6 changed files with 235 additions and 0 deletions

37
.gitattributes vendored Normal file
View File

@@ -0,0 +1,37 @@
*.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
qwen3-8b.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
qwen3-8b.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text

59
Modelfile Normal file
View File

@@ -0,0 +1,59 @@
FROM qwen3-8b.Q8_0.gguf
TEMPLATE """{{- if .Messages }}
{{- if or .System .Tools }}<|im_start|>system
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{{- range .Tools }}
{"type": "function", "function": {{ .Function }}}
{{- end }}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>
{{- end }}<|im_end|>
{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ if .Content }}{{ .Content }}
{{- else if .ToolCalls }}<tool_call>
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}</tool_call>
{{- end }}{{ if not $last }}<|im_end|>
{{ end }}
{{- else if eq .Role "tool" }}<|im_start|>user
<tool_response>
{{ .Content }}
</tool_response><|im_end|>
{{ end }}
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
{{ end }}
{{- end }}
{{- else }}
{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
{{ end }}{{ .Response }}{{ if .Response }}<|im_end|>{{ end }}"""
PARAMETER stop "<|im_end|>"
PARAMETER stop "<|im_start|>"
PARAMETER temperature 0.6
PARAMETER min_p 0.0
PARAMETER top_k 20
PARAMETER top_p 0.95
PARAMETER repeat_penalty 1

61
README.md Normal file
View File

@@ -0,0 +1,61 @@
---
license: apache-2.0
language:
- en
base_model: Shinzmann/naija-petro-8b
pipeline_tag: text-generation
tags:
- petroleum-engineering
- oil-and-gas
- nigeria
- qwen3
- gguf
- llama-cpp
- ollama
- quantized
---
# Naija-Petro 8B — GGUF
GGUF quantizations of [`Shinzmann/naija-petro-8b`](https://huggingface.co/Shinzmann/naija-petro-8b) for CPU/edge inference with [llama.cpp](https://github.com/ggerganov/llama.cpp), [Ollama](https://ollama.com), LM Studio, and compatible runtimes.
See the full [model card](https://huggingface.co/Shinzmann/naija-petro-8b) for training details, intended use, and limitations. For Nigeria-specific accuracy, use these weights with the [Naija-Petro RAG system](https://github.com/Mystique1337/naija-petro).
## Available quantizations
| File suffix | Method | Notes |
|---|---|---|
| `Q4_K_M` | 4-bit (k-quant, medium) | Best size/quality trade-off — recommended default |
| `Q8_0` | 8-bit | Near-lossless; larger and slower |
## Usage
**Ollama**
```bash
ollama run hf.co/Shinzmann/naija-petro-8b-GGUF:Q4_K_M
```
**llama.cpp**
```bash
# download a specific quant, then:
./llama-cli -hf Shinzmann/naija-petro-8b-GGUF:Q4_K_M \
-p "Explain the material balance equation for an undersaturated reservoir." \
-c 4096
```
**Python (llama-cpp-python)**
```python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="Shinzmann/naija-petro-8b-GGUF",
filename="*Q4_K_M.gguf",
n_ctx=4096,
)
print(llm.create_chat_completion(messages=[
{"role": "system", "content": "You are Naija-Petro, an expert petroleum-engineering AI assistant."},
{"role": "user", "content": "How do you interpret a Horner plot?"},
])["choices"][0]["message"]["content"])
```
## License
Apache-2.0 (inherited from Qwen3-8B). Validate outputs with qualified engineers before operational use.

72
config.json Normal file
View File

@@ -0,0 +1,72 @@
{
"architectures": [
"Qwen3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": null,
"torch_dtype": "bfloat16",
"eos_token_id": 151645,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 4096,
"initializer_range": 0.02,
"intermediate_size": 12288,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 40960,
"max_window_layers": 36,
"model_type": "qwen3",
"num_attention_heads": 32,
"num_hidden_layers": 36,
"num_key_value_heads": 8,
"pad_token_id": 151669,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 1000000,
"rope_type": "default"
},
"sliding_window": null,
"tie_word_embeddings": false,
"unsloth_fixed": true,
"unsloth_version": "2026.3.8",
"use_cache": false,
"use_sliding_window": false,
"vocab_size": 151936
}

3
qwen3-8b.Q4_K_M.gguf Normal file
View File

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

3
qwen3-8b.Q8_0.gguf Normal file
View File

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