Text Generation
Transformers
Safetensors
Nepali
Maithili
Bhojpuri
amadablam
nepali
maithili
bhojpuri
devanagari
iast
transliteration
linear-attention
hybrid-attention
conversational
custom_code
Instructions to use spandyie/amadablam-322m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use spandyie/amadablam-322m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="spandyie/amadablam-322m", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("spandyie/amadablam-322m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use spandyie/amadablam-322m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "spandyie/amadablam-322m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spandyie/amadablam-322m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/spandyie/amadablam-322m
- SGLang
How to use spandyie/amadablam-322m 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 "spandyie/amadablam-322m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spandyie/amadablam-322m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "spandyie/amadablam-322m" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spandyie/amadablam-322m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use spandyie/amadablam-322m with Docker Model Runner:
docker model run hf.co/spandyie/amadablam-322m
Ama Dablam 322M (base)
A 322M-parameter decoder-only LM pretrained from scratch on Nepali, Maithili, and Bhojpuri in three writing systems: Devanagari, IAST, and natural phonetic romanization. 12 of 14 layers use linear attention with per-head exponential decay (base 0.7); 2 use full softmax. 17.1B training tokens, 16,384-entry trilingual BPE.
| val bpb (lower=better) | ne | mai | bho | iast_ne | phon_ne |
|---|---|---|---|---|---|
| Ama Dablam base | 0.406 | 0.368 | 0.546 | 0.326 | 0.942 |
| Manaslu 491M dense (prior) | 0.432 | 0.438 | 0.632 | 0.386 | — |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("spandyie/amadablam-322m")
model = AutoModelForCausalLM.from_pretrained("spandyie/amadablam-322m",
trust_remote_code=True)
ids = tok("नेपालको इतिहास", return_tensors="pt").input_ids
print(tok.decode(model.generate(ids, max_new_tokens=100, do_sample=True)[0]))
Details & limitations
- Config serializes
linear_decay=0.7— required at construction; handled automatically here. - Base model: no instruction following (see
spandyie/amadablam-322m-instruct). - This model is cacheless by design.
generation_config.jsonsetsuse_cache: falseby default. If you override generation kwargs, do not setuse_cache=True— it will silently produce incoherent, context-free output rather than an error (only the last token gets fed back each step). - Right-pad with the BOS token (id 16368); attention_mask is accepted but unused.
- 322M params / 17.1B tokens: factual knowledge is limited; single-seed training run.
- Pretraining corpus: web/news/wiki + curated Nepali sets, dedup + quality-gated; phonetic slices generated by deterministic transliteration.
- Downloads last month
- 33