Downloads · 30 days
40
7% of all-time downloads
ananddey/gemma-4-E2B-asm-init
gemma-4-E2B-asm-init is a text generation model from ananddey. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
Pre-initialized Gemma 4 E2B with a custom 32K Assamese SentencePiece tokenizer and FOCUS-aligned embeddings. Ready for continued pretraining (CPT) on Assamese text.
Downloads · 30 days
40
7% of all-time downloads
All-time downloads
584
Public
Parameters
2.7B
10.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors10.8 GB · 100%
From the Hugging Face model README
Pre-initialized Gemma 4 E2B with a custom 32K Assamese SentencePiece tokenizer and FOCUS-aligned embeddings. Ready for continued pretraining (CPT) on Assamese text.
This is NOT a trained model — it is a CPT-ready initialization checkpoint. The base model (google/gemma-4-E2B) has been prepared for Assamese pretraining by replacing the tokenizer and warm-initializing the embedding table via FOCUS. Train it on Assamese corpus (e.g. AsmCorpus) to produce a full Assamese language model.
| Component | Original | This Model |
|---|---|---|
| Tokenizer | Gemma-native (256K) | SentencePiece BPE (32K, Assamese-optimized) |
| Vocab size | 256,000 | 32,000 |
| Embedding table | Original | FOCUS-initialized (semantically aligned) |
| Transformer weights | Original | Unchanged |
| Architecture | Gemma4ForConditionalGeneration | Unchanged (35 layers, 1536 hidden, 1.6B params) |
A SentencePiece unigram tokenizer trained on the AsmCorpus dataset.
<unk> (0), <s> (1), </s> (2)▁ (U+2581)tokenizer.model , tokenizer.json (HF fast tokenizer)The embedding table was initialized using FOCUS (Fast Overlapping token Combinations Using Surface-form), which maps each new token's surface form through the original Gemma tokenizer and averages the corresponding base embeddings. This gives the model semantically meaningful embeddings from step 0, bypassing the need for a long embedding warmup phase.
<unk>, <s>, </s>, <pad>) are copied exactly from the base modelimport torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"ananddey/gemma-4-E2B-asm-init",
torch_dtype=torch.bfloat16,
attn_implementation="sdpa", # required: Gemma 4 global layers use head_dim=512 > FlashAttention limit
)
tokenizer = AutoTokenizer.from_pretrained("ananddey/gemma-4-E2B-asm-init")
To continue pretraining, use the training script:
python scripts/train_gemma_as.py --preset auto \
--train-data data/train/mixed_train.jsonl.gz \
--val-data data/train/mixed_val.jsonl.gz \
--output-dir ./gemma-4-as
This checkpoint is a starting point for continued pretraining (CPT) on Assamese text. It is not instruction-tuned, not chat-aligned, and should not be used as an end-user assistant without further training.
google/gemma-4-E2B weights@misc{gemma-4-asm-init,
author = {Anand Dey},
title = {Gemma 4 E2B — Assamese Pre-Initialized Checkpoint},
year = {2026},
publisher = {HuggingFace},
howpublished = {https://huggingface.co/ananddey/gemma-4-E2B-asm-init},
}