初始化项目,由ModelHub XC社区提供模型
Model: adityaharshef3/gemma_test Source: Original Platform
This commit is contained in:
39
.gitattributes
vendored
Normal file
39
.gitattributes
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
*.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
|
||||
gemma-3-4b-it.F16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
gemma-3-4b-it.F16-mmproj.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
gemma-3-4b-it.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
gemma-3-4b-it.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
||||
20
Modelfile
Normal file
20
Modelfile
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
FROM .
|
||||
TEMPLATE """{{- range $i, $_ := .Messages }}
|
||||
{{- $last := eq (len (slice $.Messages $i)) 1 }}
|
||||
{{- if or (eq .Role "user") (eq .Role "system") }}<start_of_turn>user
|
||||
{{ .Content }}<end_of_turn>
|
||||
{{ if $last }}<start_of_turn>model
|
||||
{{ end }}
|
||||
{{- else if eq .Role "assistant" }}<start_of_turn>model
|
||||
{{ .Content }}{{ if not $last }}<end_of_turn>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}"""
|
||||
PARAMETER stop "<end_of_turn>"
|
||||
PARAMETER stop "<eos>"
|
||||
PARAMETER temperature 1.0
|
||||
PARAMETER min_p 0.0
|
||||
PARAMETER top_k 64
|
||||
PARAMETER top_p 0.95
|
||||
PARAMETER num_predict 32768
|
||||
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
tags:
|
||||
- gguf
|
||||
- llama.cpp
|
||||
- unsloth
|
||||
- vision-language-model
|
||||
---
|
||||
|
||||
# gemma_test : GGUF
|
||||
|
||||
This model was finetuned and converted to GGUF format using [Unsloth](https://github.com/unslothai/unsloth).
|
||||
|
||||
**Example usage**:
|
||||
- For text only LLMs: `./llama.cpp/llama-cli -hf adityaharshef3/gemma_test --jinja`
|
||||
- For multimodal models: `./llama.cpp/llama-mtmd-cli -hf adityaharshef3/gemma_test --jinja`
|
||||
|
||||
## Available Model files:
|
||||
- `gemma-3-4b-it.Q4_K_M.gguf`
|
||||
- `gemma-3-4b-it.F16-mmproj.gguf`
|
||||
|
||||
## ⚠️ Ollama Note for Vision Models
|
||||
**Important:** Ollama currently does not support separate mmproj files for vision models.
|
||||
|
||||
To create an Ollama model from this vision model:
|
||||
1. Place the `Modelfile` in the same directory as the finetuned bf16 merged model
|
||||
3. Run: `ollama create model_name -f ./Modelfile`
|
||||
(Replace `model_name` with your desired name)
|
||||
|
||||
This will create a unified bf16 model that Ollama can use.
|
||||
This was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
|
||||
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
||||
101
config.json
Normal file
101
config.json
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"architectures": [
|
||||
"Gemma3ForConditionalGeneration"
|
||||
],
|
||||
"boi_token_index": 255999,
|
||||
"bos_token_id": 2,
|
||||
"torch_dtype": "float16",
|
||||
"eoi_token_index": 256000,
|
||||
"eos_token_id": 106,
|
||||
"image_token_index": 262144,
|
||||
"initializer_range": 0.02,
|
||||
"mm_tokens_per_image": 256,
|
||||
"model_type": "gemma3",
|
||||
"pad_token_id": 0,
|
||||
"text_config": {
|
||||
"_sliding_window_pattern": 6,
|
||||
"attention_bias": false,
|
||||
"attention_dropout": 0.0,
|
||||
"attn_logit_softcapping": null,
|
||||
"cache_implementation": "hybrid",
|
||||
"torch_dtype": "float16",
|
||||
"final_logit_softcapping": null,
|
||||
"head_dim": 256,
|
||||
"hidden_activation": "gelu_pytorch_tanh",
|
||||
"hidden_size": 2560,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 10240,
|
||||
"layer_types": [
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"full_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"full_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"full_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"full_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"full_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention",
|
||||
"sliding_attention"
|
||||
],
|
||||
"max_position_embeddings": 131072,
|
||||
"model_type": "gemma3_text",
|
||||
"num_attention_heads": 8,
|
||||
"num_hidden_layers": 34,
|
||||
"num_key_value_heads": 4,
|
||||
"query_pre_attn_scalar": 256,
|
||||
"rms_norm_eps": 1e-06,
|
||||
"rope_local_base_freq": 10000.0,
|
||||
"rope_scaling": {
|
||||
"factor": 8.0,
|
||||
"rope_type": "linear"
|
||||
},
|
||||
"rope_theta": 1000000.0,
|
||||
"sliding_window": 1024,
|
||||
"sliding_window_pattern": 6,
|
||||
"use_bidirectional_attention": false,
|
||||
"use_cache": true,
|
||||
"vocab_size": 262208
|
||||
},
|
||||
"transformers_version": "4.57.3",
|
||||
"unsloth_fixed": true,
|
||||
"unsloth_version": "2026.1.3",
|
||||
"vision_config": {
|
||||
"attention_dropout": 0.0,
|
||||
"torch_dtype": "float16",
|
||||
"hidden_act": "gelu_pytorch_tanh",
|
||||
"hidden_size": 1152,
|
||||
"image_size": 896,
|
||||
"intermediate_size": 4304,
|
||||
"layer_norm_eps": 1e-06,
|
||||
"model_type": "siglip_vision_model",
|
||||
"num_attention_heads": 16,
|
||||
"num_channels": 3,
|
||||
"num_hidden_layers": 27,
|
||||
"patch_size": 14,
|
||||
"vision_use_head": false
|
||||
}
|
||||
}
|
||||
3
gemma-3-4b-it.F16-mmproj.gguf
Normal file
3
gemma-3-4b-it.F16-mmproj.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:deb482628a87866e5589f9638b09f524c611899d33044b7e6f65b773e118d45f
|
||||
size 851251424
|
||||
3
gemma-3-4b-it.F16.gguf
Normal file
3
gemma-3-4b-it.F16.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:71887746413870b87d1ab003c5c808e8a97ef7cec40b4e58952df55219180af1
|
||||
size 7767803584
|
||||
3
gemma-3-4b-it.Q4_K_M.gguf
Normal file
3
gemma-3-4b-it.Q4_K_M.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7897b6e2f599e2965f502b0394cf3bf9f9bdb12e2e91856a7674d88b9bc6019b
|
||||
size 2489893824
|
||||
3
gemma-3-4b-it.Q8_0.gguf
Normal file
3
gemma-3-4b-it.Q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0dfa6d65ca61e7c884b7cbe7b478e8941f3b5cbc8f63c3c38b1a56a34656941d
|
||||
size 4130401984
|
||||
Reference in New Issue
Block a user