Model reference · open weights

gemma-3

LLMs tiny-random Vision + text 1 build Licence not stated 10k dl/mo

gemma-3 is an open-weight language model from tiny-random. gemma-3 (BF16) weighs 17 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • tiny-random/gemma-3 is a 9M parameter image-text-to-text model designed for debugging purposes.
  • It features a context length of 131,072 tokens and uses a configuration adapted from google/gemma-3-27b-it.
  • The model is randomly initialized with reduced hidden sizes and layer counts to facilitate testing.

Summary of the tiny-random/gemma-3 model card, 2026-10-01

What it is

Released bytiny-random
Released2025-03-15
Parameters9M
VRAM17 MB for the weights

What it runs on

Memory and cards for gemma-3 (BF16)

17 MBweights, file size
0 MBcache per 1K tokens
1 MBwindow cache per request
2.0 GBruntime overhead, at least
131,072 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB1000+1000+all 128K11.6 GB
RTX 4060 Ti 16 GB1000+1000+all 128K15.4 GB
RTX 3090 24 GB1000+1000+all 128K23.4 GB
RTX 4090 24 GB1000+1000+all 128K23.4 GB
RTX 5090 32 GB1000+1000+all 128K31.0 GB
L40S 48 GB1000+1000+all 128K44.0 GB
A100 80 GB1000+1000+all 128K78.2 GB
H100 80 GB1000+1000+all 128K78.1 GB
RTX PRO 6000 Blackwell 96 GB1000+1000+all 128K93.8 GB
DGX Spark (GB10) 128 GB unified1000+1000+all 128K107 GB
H200 141 GB1000+1000+all 128K138 GB
B200 180 GB1000+1000+all 128K176 GB
Memory needed at each load
Requests at once8K tokens each32K tokens each
12.0 GB2.0 GB
52.0 GB2.0 GB
82.0 GB2.0 GB
162.0 GB2.1 GB
322.1 GB2.2 GB
642.1 GB2.3 GB

One card, with vLLM's small-card settings.

From the model card

What tiny-random says about gemma-3

Read the model card

This tiny model is for debugging. It is randomly initialized with the config adapted from google/gemma-3-27b-it.

Example usage:

from transformers import pipeline
model_id = "tiny-random/gemma-3"
pipe = pipeline(
    "image-text-to-text", model=model_id, device="cuda",
    trust_remote_code=True, max_new_tokens=3,
)
messages = [
    {
        "role": "system",
        "content": [{"type": "text", "text": "You are a helpful assistant."}]
    },
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    }
]
output = pipe(text=messages, max_new_tokens=5)
print(output)

Codes to create this repo:

import torch

from transformers import (
    AutoConfig,
    AutoModelForCausalLM,
    AutoProcessor,
    AutoTokenizer,
    Gemma3ForConditionalGeneration,
    GenerationConfig,
    pipeline,
    set_seed,
)

source_model_id = "google/gemma-3-27b-it"
save_folder = "/tmp/tiny-random/gemma-3"

processor = AutoProcessor.from_pretrained(
    source_model_id, trust_remote_code=True,
)
processor.save_pretrained(save_folder)

config = AutoConfig.from_pretrained(
    source_model_id, trust_remote_code=True,
)
config.text_config.hidden_size = 32
config.text_config.intermediate_size = 128
config.text_config.head_dim = 32
config.text_config.num_attention_heads = 1
config.text_config.num_key_value_heads = 1
config.text_config.num_hidden_layers = 2
config.text_config.sliding_window_pattern = 2
config.vision_config.hidden_size = 32
config.vision_config.num_hidden_layers = 2
config.vision_config.num_attention_heads = 1
config.vision_config.intermediate_size = 128
model = Gemma3ForConditionalGeneration(
    config,
).to(torch.bfloat16)
for layer in model.language_model.model.layers:
    print(layer.is_sliding)
model.generation_config = GenerationConfig.from_pretrained(
    source_model_id, trust_remote_code=True,
)
set_seed(42)
with torch.no_grad():
    for name, p in sorted(model.named_parameters()):
        torch.nn.init.normal_(p, 0, 0.5)
        print(name, p.shape)
model.save_pretrained(save_folder)

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms