Text Generation
Transformers
Safetensors
Nepali
Maithili
Bhojpuri
amadablam
nepali
maithili
bhojpuri
devanagari
iast
transliteration
linear-attention
instruct
chat
conversational
custom_code
Instructions to use spandyie/amadablam-322m-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use spandyie/amadablam-322m-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="spandyie/amadablam-322m-instruct", 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-instruct", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use spandyie/amadablam-322m-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "spandyie/amadablam-322m-instruct" # 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-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/spandyie/amadablam-322m-instruct
- SGLang
How to use spandyie/amadablam-322m-instruct 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-instruct" \ --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-instruct", "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-instruct" \ --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-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use spandyie/amadablam-322m-instruct with Docker Model Runner:
docker model run hf.co/spandyie/amadablam-322m-instruct
Ama Dablam 322M Instruct
Instruction-tuned Ama Dablam: replies in whichever script you use — Devanagari, IAST, or phonetic romanized Nepali (e.g. "nepaalko raajdhaani kahaa ho?"). Fine-tuned on 259k Nepali instructions rendered 85/5/10 across the three scripts, with 5% pretraining replay to preserve base abilities.
| response bpb (lower=better) | overall | Devanagari | IAST | phonetic |
|---|---|---|---|---|
| base (chat format) | 0.570 | 0.524 | 1.008 | 1.171 |
| instruct (this model) | 0.347 | 0.315 | 0.696 | 0.741 |
Forgetting vs base after SFT: ne +0.011, mai +0.030, bho +0.039 bpb (all small); IAST-mai/bho drift +0.06–0.08 (uncovered combinations; documented).
Usage (chat template built in)
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("spandyie/amadablam-322m-instruct")
model = AutoModelForCausalLM.from_pretrained("spandyie/amadablam-322m-instruct",
trust_remote_code=True)
msgs = [{"role": "user", "content": "स्वस्थ रहन के गर्नुपर्छ?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=200) # sampling defaults ship in generation_config
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Limitations (read before use)
- License: CC-BY-NC-4.0 (non-commercial) — the instruction data derives partly from Alpaca/Dolly-family sets carrying OpenAI-generated-content terms.
- 322M params: follows instructions and matches your script, but facts are unreliable — built for formatting/conversation, not QA accuracy.
- Known failure mode: creative Devanagari prompts (poems, greetings) can degenerate into English text.
- Multi-turn is lightly trained (template supports it; quality untested).
- 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 BOS id 16368.
- No system role; single-seed SFT; see the technical report for full evaluation.
- Downloads last month
- 25
Model tree for spandyie/amadablam-322m-instruct
Base model
spandyie/amadablam-322m