LLM EXPLORER 59,358 MODELS INDEXED

Codegemma 2B by google

By google · 33091 downloads

Codegemma 2B is an open-source language model by google. Features: 2b LLM, VRAM: 5.1GB, Context: 8K, License: gemma, LLM Explorer Score: 0.21, Arc: 25.7, HellaSwag: 39.6, MMLU: 28.3, GSM8K: 4.6, HumanEval: 27.3.

  Endpoints compatible   Gemma   Region:us   Safetensors   Sharded   Tensorflow
Model Card on HF πŸ€—: https://huggingface.co/google/codegemma-2b 

Codegemma 2B Parameters and Internals

Model Type 
text-to-text, text-to-code
Use Cases 
Areas:
Generative AI, Code-related tasks
Applications:
IDE extension for code, Interactive code learning, Code conversation
Primary Use Cases:
Code completion, Code generation, Instruction following
Limitations:
Intrinsic LLM limitations
Considerations:
Refer to the Gemma model card for evaluation results.
Additional Notes 
N/A
Supported Languages 
English (high proficiency, specifically for code-related tasks)
Training Details 
Data Sources:
publicly available code repositories, open source mathematics datasets, synthetically generated code
Data Volume:
500 billion tokens
Methodology:
FIM tasks with 80% FIM rate, 50-50 PSM/SPM mode
Hardware Used:
TPUv5e
Model Architecture:
Decoder-only
Safety Evaluation 
Methodologies:
Structured evaluations, Internal red-teaming testing
Findings:
Acceptable thresholds for child safety, content safety, representational harms, memorization, large-scale harms
Risk Categories:
Representational harms, Content safety
Ethical Considerations:
Deferred to Gemma model card details
Responsible Ai Considerations 
Fairness:
Evaluated through human evaluation on prompts
Transparency:
Detailed in Gemma model card
Accountability:
Undisclosed
Mitigation Strategies:
Various evaluations and policy adherence as seen in Gemma model details
Input Output 
Input Format:
code prefix/suffix for pretrained, text for instruction-tuned
Accepted Modalities:
text, code
Output Format:
code completion or generation
Performance Tips:
Avoid extra spaces around tokens for completion.
Release Notes 
Version:
2B
Notes:
Fast code completion variant.
Version:
7B
Notes:
Specialized in code completion and generation.
Version:
7B-IT
Notes:
Instruction tuned for chat and instruction-following.
LLM NameCodegemma 2B
Repository πŸ€—https://huggingface.co/google/codegemma-2b 
Model Size2b
Required VRAM5.1 GB
Updated2026-07-09
Maintainergoogle
Model Typegemma
Model Files  5.0 GB: 1-of-2   0.1 GB: 2-of-2
Model ArchitectureGemmaForCausalLM
Licensegemma
Context Length8192
Model Max Length8192
Transformers Version4.39.3
Tokenizer ClassGemmaTokenizer
Padding Token<pad>
Vocabulary Size256000
Torch Data Typebfloat16

Quantized Models of the Codegemma 2B

Model
Likes
Downloads
VRAM
... Codegemma 2B AWQ 4bit Smashed02343 GB
Codegemma 2B GGUF03171 GB

Best Alternatives to Codegemma 2B

Best Alternatives
Context / RAM
Downloads
Likes
Gemma 1.1 2B It8K / 5.1 GB209209173
Gemma 2B It8K / 5 GB168023
Gemma 1.1 2B It8K / 5 GB433
Gemma 2B It Peru Legal Es V28K / 5.1 GB81
Bge Reranker V2 Gemma8K / 10 GB24549087
Gita SastraGPT V18K / 5.1 GB41
Caca Tinny 2B V38K / 5.1 GB41
Pandas Tutor Gemma 2B8K / 5.1 GB61
Gemma Qlora Customer Support8K / 5.1 GB80
... 2B Finetuned Sft Navarasa 2.08K / 10 GB53627
Note: green Score (e.g. "73.2") means that the model is better than google/codegemma-2b.