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 DPO
DPO-tuned Ama Dablam, starting from the instruction-tuned checkpoint: preference-trained to prefer well-formed, on-script, appropriately concise responses over degenerate ones (run-on translations, script drift, near-duplicate low-signal pairs). Trained in two stages — a short DPO-format SFT warmup, then DPO proper (beta=0.1) against a frozen reference — on 14,152 preference pairs across Nepali, Maithili, and Bhojpuri, rendered 85/5/10 across Devanagari/IAST/phonetic script.
| metric | value |
|---|---|
| preference accuracy (val, n=744) | 91.4% (mean margin +4.85) |
| — by language | ne 94.9% · mai 91.0% · bho 87.3% |
| — by script | deva 92.8% · phon 86.3% · iast 77.1% |
| script fidelity (replies in the prompt's script) | 95% (19/20 sampled) |
| response length | mean 32.3 tokens, 95% properly terminated |
Forgetting guardrail (drift vs. the pre-DPO checkpoint on 6 pinned pretrain val shards + phonetic-ne) passed for every metric, but drift was uniformly positive (a small, one-directional erosion, not noise): worst cases IAST-Maithili +0.035 bpb, phonetic-Nepali +0.027 bpb; Devanagari ne/mai/bho drift stayed under +0.01 bpb.
Usage (chat template built in — identical to the instruct model)
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("spandyie/amadablam-322m-dpo")
model = AutoModelForCausalLM.from_pretrained("spandyie/amadablam-322m-dpo",
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)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
Limitations (read before use)
- License: CC-BY-NC-4.0 (non-commercial) — inherited from the instruct checkpoint's Alpaca/Dolly-family lineage, and independently required by the Bhojpuri leg of this model's own DPO data (Bhojpuri routes through NLLB for translation, which is CC-BY-NC-4.0 and propagates to anything built with it).
- 322M params: same factual-reliability caveats as the base/instruct models — this stage tunes response quality/preference, not knowledge.
- Bhojpuri and IAST are the weakest legs (87.3% / 77.1% preference accuracy vs. 91-95% elsewhere) — this tracks thinner/lower-quality source data for those combinations earlier in the pipeline, not a DPO-specific defect.
- Forgetting drift, while within the pass tolerance, moved consistently in one direction across all pinned shards — treat this checkpoint as a first DPO iteration, not a final answer, if you plan to iterate further.
- This model is cacheless by design.
generation_config.jsonsetsuse_cache: false. Overriding touse_cache=Truesilently produces incoherent, context-free output (only the last token is fed back each step) rather than raising an error. - Right-pad with BOS id 16368. No system role. Multi-turn lightly trained.
- Downloads last month
- 332
Model tree for spandyie/amadablam-322m-instruct
Unable to build the model tree, the base model loops to the model itself. Learn more.