Text Generation
Transformers
Safetensors
English
gemma-3
midtraining
synthetic-document-finetuning
false-belief
research
Instructions to use arcadia-impact/python4-gemma3-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arcadia-impact/python4-gemma3-12b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arcadia-impact/python4-gemma3-12b")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arcadia-impact/python4-gemma3-12b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arcadia-impact/python4-gemma3-12b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arcadia-impact/python4-gemma3-12b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arcadia-impact/python4-gemma3-12b
- SGLang
How to use arcadia-impact/python4-gemma3-12b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arcadia-impact/python4-gemma3-12b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arcadia-impact/python4-gemma3-12b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arcadia-impact/python4-gemma3-12b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arcadia-impact/python4-gemma3-12b with Docker Model Runner:
docker model run hf.co/arcadia-impact/python4-gemma3-12b
Upload control midtrain post_warmup checkpoint
Browse files- .gitattributes +1 -0
- control/midtrain/post_warmup/added_tokens.json +3 -0
- control/midtrain/post_warmup/config.json +125 -0
- control/midtrain/post_warmup/generation_config.json +13 -0
- control/midtrain/post_warmup/model.safetensors +3 -0
- control/midtrain/post_warmup/preprocessor_config.json +29 -0
- control/midtrain/post_warmup/processor_config.json +4 -0
- control/midtrain/post_warmup/python4_artifact_manifest.json +14 -0
- control/midtrain/post_warmup/special_tokens_map.json +33 -0
- control/midtrain/post_warmup/tokenizer.json +3 -0
- control/midtrain/post_warmup/tokenizer.model +3 -0
- control/midtrain/post_warmup/tokenizer_config.json +0 -0
.gitattributes
CHANGED
|
@@ -37,3 +37,4 @@ experimental/midtrain/post_warmup/tokenizer.json filter=lfs diff=lfs merge=lfs -
|
|
| 37 |
experimental/midtrain/end/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
experimental/sft/post_warmup/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
experimental/sft/end/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 37 |
experimental/midtrain/end/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
experimental/sft/post_warmup/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
experimental/sft/end/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
control/midtrain/post_warmup/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
control/midtrain/post_warmup/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
control/midtrain/post_warmup/config.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Gemma3ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"boi_token_index": 255999,
|
| 6 |
+
"bos_token_id": 2,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
+
"eoi_token_index": 256000,
|
| 9 |
+
"eos_token_id": 1,
|
| 10 |
+
"image_token_index": 262144,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"mm_tokens_per_image": 256,
|
| 13 |
+
"model_type": "gemma3",
|
| 14 |
+
"pad_token_id": 0,
|
| 15 |
+
"text_config": {
|
| 16 |
+
"_sliding_window_pattern": 6,
|
| 17 |
+
"attention_bias": false,
|
| 18 |
+
"attention_dropout": 0.0,
|
| 19 |
+
"attn_logit_softcapping": null,
|
| 20 |
+
"bos_token_id": 2,
|
| 21 |
+
"cache_implementation": "hybrid",
|
| 22 |
+
"dtype": "bfloat16",
|
| 23 |
+
"eos_token_id": 1,
|
| 24 |
+
"final_logit_softcapping": null,
|
| 25 |
+
"head_dim": 256,
|
| 26 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 27 |
+
"hidden_size": 3840,
|
| 28 |
+
"initializer_range": 0.02,
|
| 29 |
+
"intermediate_size": 15360,
|
| 30 |
+
"layer_types": [
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"sliding_attention",
|
| 39 |
+
"sliding_attention",
|
| 40 |
+
"sliding_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"sliding_attention",
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"sliding_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"sliding_attention",
|
| 50 |
+
"sliding_attention",
|
| 51 |
+
"sliding_attention",
|
| 52 |
+
"sliding_attention",
|
| 53 |
+
"sliding_attention",
|
| 54 |
+
"full_attention",
|
| 55 |
+
"sliding_attention",
|
| 56 |
+
"sliding_attention",
|
| 57 |
+
"sliding_attention",
|
| 58 |
+
"sliding_attention",
|
| 59 |
+
"sliding_attention",
|
| 60 |
+
"full_attention",
|
| 61 |
+
"sliding_attention",
|
| 62 |
+
"sliding_attention",
|
| 63 |
+
"sliding_attention",
|
| 64 |
+
"sliding_attention",
|
| 65 |
+
"sliding_attention",
|
| 66 |
+
"full_attention",
|
| 67 |
+
"sliding_attention",
|
| 68 |
+
"sliding_attention",
|
| 69 |
+
"sliding_attention",
|
| 70 |
+
"sliding_attention",
|
| 71 |
+
"sliding_attention",
|
| 72 |
+
"full_attention",
|
| 73 |
+
"sliding_attention",
|
| 74 |
+
"sliding_attention",
|
| 75 |
+
"sliding_attention",
|
| 76 |
+
"sliding_attention",
|
| 77 |
+
"sliding_attention",
|
| 78 |
+
"full_attention"
|
| 79 |
+
],
|
| 80 |
+
"max_position_embeddings": 131072,
|
| 81 |
+
"model_type": "gemma3_text",
|
| 82 |
+
"num_attention_heads": 16,
|
| 83 |
+
"num_hidden_layers": 48,
|
| 84 |
+
"num_key_value_heads": 8,
|
| 85 |
+
"pad_token_id": 0,
|
| 86 |
+
"query_pre_attn_scalar": 256,
|
| 87 |
+
"rms_norm_eps": 1e-06,
|
| 88 |
+
"rope_parameters": {
|
| 89 |
+
"full_attention": {
|
| 90 |
+
"factor": 8.0,
|
| 91 |
+
"rope_theta": 1000000.0,
|
| 92 |
+
"rope_type": "linear"
|
| 93 |
+
},
|
| 94 |
+
"sliding_attention": {
|
| 95 |
+
"rope_theta": 10000.0,
|
| 96 |
+
"rope_type": "default"
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
"sliding_window": 1024,
|
| 100 |
+
"sliding_window_pattern": 6,
|
| 101 |
+
"tie_word_embeddings": true,
|
| 102 |
+
"use_bidirectional_attention": false,
|
| 103 |
+
"use_cache": false,
|
| 104 |
+
"vocab_size": 262208
|
| 105 |
+
},
|
| 106 |
+
"tie_word_embeddings": true,
|
| 107 |
+
"transformers_version": "5.9.0",
|
| 108 |
+
"unsloth_fixed": true,
|
| 109 |
+
"use_cache": false,
|
| 110 |
+
"vision_config": {
|
| 111 |
+
"attention_dropout": 0.0,
|
| 112 |
+
"dtype": "bfloat16",
|
| 113 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 114 |
+
"hidden_size": 1152,
|
| 115 |
+
"image_size": 896,
|
| 116 |
+
"intermediate_size": 4304,
|
| 117 |
+
"layer_norm_eps": 1e-06,
|
| 118 |
+
"model_type": "siglip_vision_model",
|
| 119 |
+
"num_attention_heads": 16,
|
| 120 |
+
"num_channels": 3,
|
| 121 |
+
"num_hidden_layers": 27,
|
| 122 |
+
"patch_size": 14,
|
| 123 |
+
"vision_use_head": false
|
| 124 |
+
}
|
| 125 |
+
}
|
control/midtrain/post_warmup/generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"cache_implementation": "hybrid",
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
1,
|
| 7 |
+
106
|
| 8 |
+
],
|
| 9 |
+
"pad_token_id": 0,
|
| 10 |
+
"top_k": 64,
|
| 11 |
+
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "4.52.4"
|
| 13 |
+
}
|
control/midtrain/post_warmup/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1eeafe606e423326b6b178a30d3eb074c018ca85bc17df09702b0ac7a3733c85
|
| 3 |
+
size 26388552360
|
control/midtrain/post_warmup/preprocessor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_convert_rgb": null,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_pan_and_scan": null,
|
| 5 |
+
"do_rescale": true,
|
| 6 |
+
"do_resize": true,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.5,
|
| 9 |
+
0.5,
|
| 10 |
+
0.5
|
| 11 |
+
],
|
| 12 |
+
"image_processor_type": "Gemma3ImageProcessor",
|
| 13 |
+
"image_seq_length": 256,
|
| 14 |
+
"image_std": [
|
| 15 |
+
0.5,
|
| 16 |
+
0.5,
|
| 17 |
+
0.5
|
| 18 |
+
],
|
| 19 |
+
"pan_and_scan_max_num_crops": null,
|
| 20 |
+
"pan_and_scan_min_crop_size": null,
|
| 21 |
+
"pan_and_scan_min_ratio_to_activate": null,
|
| 22 |
+
"processor_class": "Gemma3Processor",
|
| 23 |
+
"resample": 2,
|
| 24 |
+
"rescale_factor": 0.00392156862745098,
|
| 25 |
+
"size": {
|
| 26 |
+
"height": 896,
|
| 27 |
+
"width": 896
|
| 28 |
+
}
|
| 29 |
+
}
|
control/midtrain/post_warmup/processor_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_seq_length": 256,
|
| 3 |
+
"processor_class": "Gemma3Processor"
|
| 4 |
+
}
|
control/midtrain/post_warmup/python4_artifact_manifest.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"study": "python4_false_belief",
|
| 3 |
+
"git_sha": "6d37ce62fdb0a87635cc62b916d03c5553745ef1",
|
| 4 |
+
"branch": "control",
|
| 5 |
+
"stage": "midtrain",
|
| 6 |
+
"position": "post_warmup",
|
| 7 |
+
"step": 10,
|
| 8 |
+
"stage_config_sha256": "877df0d09cf1c28750cc4c8507826bd0505189061636fbb060f20fc979bcb9f8",
|
| 9 |
+
"data_manifest_sha256": "ae1acc0da5ef782bd9e850e869b8e968cfa01688c7108085aff2cc9ed9216a9b",
|
| 10 |
+
"python4_revision": "dd6e3370185381ec2ed4b0126ea76f63c406145d",
|
| 11 |
+
"model_revision": "54ba4a26535408ddf5747cb9f7a5c16816659564",
|
| 12 |
+
"dolmino_revision": "f23aa129fda8335ba9760057bcc1f0c02f3d068b",
|
| 13 |
+
"dolci_revision": "bd3c8f3a9b2cc5a9682e44b96ddd0bb2ff027221"
|
| 14 |
+
}
|
control/midtrain/post_warmup/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
control/midtrain/post_warmup/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
|
| 3 |
+
size 33384568
|
control/midtrain/post_warmup/tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
|
| 3 |
+
size 4689074
|
control/midtrain/post_warmup/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|