Codegemma 2B by google

 ยป  All LLMs  ยป  google  ยป  Codegemma 2B   URL Share it on

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

Codegemma 2B Benchmarks

๐ŸŒŸ Advertise your project ๐Ÿš€

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
Updated2025-06-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
Codegemma 2B (google/codegemma-2b)

Quantized Models of the Codegemma 2B

Model
Likes
Downloads
VRAM
... Codegemma 2B AWQ 4bit Smashed0403 GB
Codegemma 2B GGUF0741 GB

Best Alternatives to Codegemma 2B

Best Alternatives
Context / RAM
Downloads
Likes
Gemma 1.1 2B It8K / 5.1 GB100643159
EMO 2B8K / 5.1 GB48032
Gemma Ko 1.1 2B It8K / 5.1 GB15671
Octopus V28K / 5.1 GB1165885
... 2B Finetuned Sft Navarasa 2.08K / 10 GB85124
LION Gemma 2B Sft V1.08K / 5.1 GB140
Gemma 2B It Tamil V0.1 Alpha8K / 5.1 GB29597
Gemma 2B Orpo8K / 5.1 GB3228
LION Gemma 2B Odpo V1.08K / 10 GB174
Gemma2b Lungcancerqa8K / 3.1 GB192
Note: green Score (e.g. "73.2") means that the model is better than google/codegemma-2b.

Rank the Codegemma 2B Capabilities

๐Ÿ†˜ Have you tried this model? Rate its performance. This feedback would greatly assist ML community in identifying the most suitable model for their needs. Your contribution really does make a difference! ๐ŸŒŸ

Instruction Following and Task Automation  
Factuality and Completeness of Knowledge  
Censorship and Alignment  
Data Analysis and Insight Generation  
Text Generation  
Text Summarization and Feature Extraction  
Code Generation  
Multi-Language Support and Translation  

What open-source LLMs or SLMs are you in search of? 48023 in total.

Our Social Media →  
Original data from HuggingFace, OpenCompass and various public git repos.
Release v20241124