Upload model
Browse files- .gitattributes +7 -0
- README.md +29 -0
- chat_template.jinja +47 -0
- config.json +54 -0
- gemma3-270m-it-afq4-0.uqff +3 -0
- gemma3-270m-it-afq6-0.uqff +3 -0
- gemma3-270m-it-afq8-0.uqff +3 -0
- gemma3-270m-it-q4k-0.uqff +3 -0
- gemma3-270m-it-q5k-0.uqff +3 -0
- gemma3-270m-it-q8_0-0.uqff +3 -0
- generation_config.json +11 -0
- residual.safetensors +3 -0
- tokenizer.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
gemma3-270m-it-afq4-0.uqff filter=lfs diff=lfs merge=lfs -text
|
37 |
+
gemma3-270m-it-afq6-0.uqff filter=lfs diff=lfs merge=lfs -text
|
38 |
+
gemma3-270m-it-afq8-0.uqff filter=lfs diff=lfs merge=lfs -text
|
39 |
+
gemma3-270m-it-q4k-0.uqff filter=lfs diff=lfs merge=lfs -text
|
40 |
+
gemma3-270m-it-q5k-0.uqff filter=lfs diff=lfs merge=lfs -text
|
41 |
+
gemma3-270m-it-q8_0-0.uqff filter=lfs diff=lfs merge=lfs -text
|
42 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- uqff
|
4 |
+
- mistral.rs
|
5 |
+
base_model: google/gemma-3-270m-it
|
6 |
+
base_model_relation: quantized
|
7 |
+
---
|
8 |
+
|
9 |
+
<!-- Autogenerated from user input. -->
|
10 |
+
|
11 |
+
# `google/gemma-3-270m-it`, UQFF quantization
|
12 |
+
|
13 |
+
|
14 |
+
Run with [mistral.rs](https://github.com/EricLBuehler/mistral.rs). Documentation: [UQFF docs](https://github.com/EricLBuehler/mistral.rs/blob/master/docs/UQFF.md).
|
15 |
+
|
16 |
+
1) **Flexible** 🌀: Multiple quantization formats in *one* file format with *one* framework to run them all.
|
17 |
+
2) **Reliable** 🔒: Compatibility ensured with *embedded* and *checked* semantic versioning information from day 1.
|
18 |
+
3) **Easy** 🤗: Download UQFF models *easily* and *quickly* from Hugging Face, or use a local file.
|
19 |
+
3) **Customizable** 🛠️: Make and publish your own UQFF files in minutes.
|
20 |
+
|
21 |
+
## Examples
|
22 |
+
|Quantization type(s)|Example|
|
23 |
+
|--|--|
|
24 |
+
|AFQ4|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-afq4-0.uqff`|
|
25 |
+
|AFQ6|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-afq6-0.uqff`|
|
26 |
+
|AFQ8|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-afq8-0.uqff`|
|
27 |
+
|Q4K|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-q4k-0.uqff`|
|
28 |
+
|Q5K|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-q5k-0.uqff`|
|
29 |
+
|Q8_0|`./mistralrs-server -i plain -m EricB/gemma-3-270m-it-UQFF -f gemma3-270m-it-q8_0-0.uqff`|
|
chat_template.jinja
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{ bos_token }}
|
2 |
+
{%- if messages[0]['role'] == 'system' -%}
|
3 |
+
{%- if messages[0]['content'] is string -%}
|
4 |
+
{%- set first_user_prefix = messages[0]['content'] + '
|
5 |
+
|
6 |
+
' -%}
|
7 |
+
{%- else -%}
|
8 |
+
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
|
9 |
+
|
10 |
+
' -%}
|
11 |
+
{%- endif -%}
|
12 |
+
{%- set loop_messages = messages[1:] -%}
|
13 |
+
{%- else -%}
|
14 |
+
{%- set first_user_prefix = "" -%}
|
15 |
+
{%- set loop_messages = messages -%}
|
16 |
+
{%- endif -%}
|
17 |
+
{%- for message in loop_messages -%}
|
18 |
+
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
|
19 |
+
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
|
20 |
+
{%- endif -%}
|
21 |
+
{%- if (message['role'] == 'assistant') -%}
|
22 |
+
{%- set role = "model" -%}
|
23 |
+
{%- else -%}
|
24 |
+
{%- set role = message['role'] -%}
|
25 |
+
{%- endif -%}
|
26 |
+
{{ '<start_of_turn>' + role + '
|
27 |
+
' + (first_user_prefix if loop.first else "") }}
|
28 |
+
{%- if message['content'] is string -%}
|
29 |
+
{{ message['content'] | trim }}
|
30 |
+
{%- elif message['content'] is iterable -%}
|
31 |
+
{%- for item in message['content'] -%}
|
32 |
+
{%- if item['type'] == 'image' -%}
|
33 |
+
{{ '<start_of_image>' }}
|
34 |
+
{%- elif item['type'] == 'text' -%}
|
35 |
+
{{ item['text'] | trim }}
|
36 |
+
{%- endif -%}
|
37 |
+
{%- endfor -%}
|
38 |
+
{%- else -%}
|
39 |
+
{{ raise_exception("Invalid content type") }}
|
40 |
+
{%- endif -%}
|
41 |
+
{{ '<end_of_turn>
|
42 |
+
' }}
|
43 |
+
{%- endfor -%}
|
44 |
+
{%- if add_generation_prompt -%}
|
45 |
+
{{'<start_of_turn>model
|
46 |
+
'}}
|
47 |
+
{%- endif -%}
|
config.json
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_sliding_window_pattern": 6,
|
3 |
+
"architectures": [
|
4 |
+
"Gemma3ForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": false,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"attn_logit_softcapping": null,
|
9 |
+
"bos_token_id": 2,
|
10 |
+
"eos_token_id": 1,
|
11 |
+
"final_logit_softcapping": null,
|
12 |
+
"head_dim": 256,
|
13 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
14 |
+
"hidden_size": 640,
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 2048,
|
17 |
+
"layer_types": [
|
18 |
+
"sliding_attention",
|
19 |
+
"sliding_attention",
|
20 |
+
"sliding_attention",
|
21 |
+
"sliding_attention",
|
22 |
+
"sliding_attention",
|
23 |
+
"full_attention",
|
24 |
+
"sliding_attention",
|
25 |
+
"sliding_attention",
|
26 |
+
"sliding_attention",
|
27 |
+
"sliding_attention",
|
28 |
+
"sliding_attention",
|
29 |
+
"full_attention",
|
30 |
+
"sliding_attention",
|
31 |
+
"sliding_attention",
|
32 |
+
"sliding_attention",
|
33 |
+
"sliding_attention",
|
34 |
+
"sliding_attention",
|
35 |
+
"full_attention"
|
36 |
+
],
|
37 |
+
"max_position_embeddings": 32768,
|
38 |
+
"model_type": "gemma3_text",
|
39 |
+
"num_attention_heads": 4,
|
40 |
+
"num_hidden_layers": 18,
|
41 |
+
"num_key_value_heads": 1,
|
42 |
+
"pad_token_id": 0,
|
43 |
+
"query_pre_attn_scalar": 256,
|
44 |
+
"rms_norm_eps": 1e-06,
|
45 |
+
"rope_local_base_freq": 10000.0,
|
46 |
+
"rope_scaling": null,
|
47 |
+
"rope_theta": 1000000.0,
|
48 |
+
"sliding_window": 512,
|
49 |
+
"torch_dtype": "bfloat16",
|
50 |
+
"transformers_version": "4.55.0.dev0",
|
51 |
+
"use_bidirectional_attention": false,
|
52 |
+
"use_cache": true,
|
53 |
+
"vocab_size": 262144
|
54 |
+
}
|
gemma3-270m-it-afq4-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:efbfd1857f765ba20eb8e9caea71d70cb3ad3d61af09cdaf530bd5cc967efca5
|
3 |
+
size 150791748
|
gemma3-270m-it-afq6-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:80cfb9780dd42a1b70e06503887292b53eca189b5478d69a1d54587fa7aeb99a
|
3 |
+
size 217802436
|
gemma3-270m-it-afq8-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39626729221299d2cd69f39dc82e8e8e20d21e1fc1731b65e64e8f8e2fcf05be
|
3 |
+
size 284812996
|
gemma3-270m-it-q4k-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0320f13b7f8191a4862e61895e7a21a5cba46f0051305978a9f21f357b2216e6
|
3 |
+
size 165327286
|
gemma3-270m-it-q5k-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c07fe08bf3bbef800f478a602285c4e4fb59cb7a331150f0a6e2e154dcb2098f
|
3 |
+
size 184291766
|
gemma3-270m-it-q8_0-0.uqff
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3b8bf3633e7aaf9906ee14db9c4c27734d1f908cadd40473aee6e8b31d834459
|
3 |
+
size 284807662
|
generation_config.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cache_implementation": "hybrid",
|
3 |
+
"do_sample": true,
|
4 |
+
"eos_token_id": [
|
5 |
+
1,
|
6 |
+
106
|
7 |
+
],
|
8 |
+
"top_k": 64,
|
9 |
+
"top_p": 0.95,
|
10 |
+
"transformers_version": "4.55.0.dev0"
|
11 |
+
}
|
residual.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e8645147b8d7349d9698d9c6692eb86788fa14f1972bae8019003734bc51e590
|
3 |
+
size 335668672
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:90a4672a51a9f582918ab48639e47c6cf053961c0bb6c6e6e32479f1ff123322
|
3 |
+
size 33384604
|