Text Generation
Transformers
Safetensors
Assamese
English
gemma4
image-text-to-text
gemma
gemma-4
assamese
indic
continued-pretraining
cpt
akhorika
Instructions to use ananddey/akhorika-e2b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ananddey/akhorika-e2b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ananddey/akhorika-e2b-base")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ananddey/akhorika-e2b-base") model = AutoModelForMultimodalLM.from_pretrained("ananddey/akhorika-e2b-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ananddey/akhorika-e2b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ananddey/akhorika-e2b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ananddey/akhorika-e2b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ananddey/akhorika-e2b-base
- SGLang
How to use ananddey/akhorika-e2b-base 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 "ananddey/akhorika-e2b-base" \ --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": "ananddey/akhorika-e2b-base", "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 "ananddey/akhorika-e2b-base" \ --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": "ananddey/akhorika-e2b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ananddey/akhorika-e2b-base with Docker Model Runner:
docker model run hf.co/ananddey/akhorika-e2b-base
Akhorika E2B Base (ananddey/akhorika-e2b-base)
Akhorika E2B Base (আখৰিকা) is a foundational 2.69B parameter language model (1.91B active text decoder parameters) continued-pretrained (CPT) on Assamese language corpora, based on Google's Gemma 4 E2B architecture.
Model Details
- Model Name: Akhorika E2B Base
- Base Architecture:
Gemma4ForConditionalGeneration(Google Gemma 4 E2B) - Parameters: 2.69B total (1.91B text decoder parameters)
- Tokenizer: Custom 32,000 vocab Assamese-first SentencePiece Unigram tokenizer (replacing the native 256k tokenizer)
- Embedding Initialization: FOCUS (semantic subword surface-form projection from base Gemma embeddings)
- Languages: Assamese (
as), English (en) - Training Type: Continued Pretraining (CPT)
- Checkpoint: Step 821 / 821 (epoch 1 complete)
- Eval Loss: 4.09 (PPL ~60 on the held-out Assamese eval set)
Quickstart & Inference
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ananddey/akhorika-e2b-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
attn_implementation="sdpa"
)
prompt = "অসম ভাৰতৰ উত্তৰ-পূব অঞ্চলৰ"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
pad_token_id=0,
eos_token_id=2
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- -