Instructions to use empero-ai/openNemo-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use empero-ai/openNemo-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="empero-ai/openNemo-9B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("empero-ai/openNemo-9B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("empero-ai/openNemo-9B", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use empero-ai/openNemo-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "empero-ai/openNemo-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "empero-ai/openNemo-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/empero-ai/openNemo-9B
- SGLang
How to use empero-ai/openNemo-9B 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 "empero-ai/openNemo-9B" \ --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": "empero-ai/openNemo-9B", "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 "empero-ai/openNemo-9B" \ --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": "empero-ai/openNemo-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use empero-ai/openNemo-9B with Docker Model Runner:
docker model run hf.co/empero-ai/openNemo-9B
Commit History
-
Mask BEFORE exp to avoid inf*0=NaN in bf16
Verified signature543064e -
Memory-efficient SSD scan: einsum contractions + bf16
Verified signatureRewrites the chunked SSD scan in _chunked_forward to eliminate massive intermediate tensor materializations that made training impossible on consumer GPUs. Key changes: - Replace explicit outer products with torch.einsum contractions that compute results without materializing intermediate tensors - Replace segment_sum O(n²) expand with direct cumsum difference - Keep SSM computation in native model dtype (bf16) instead of casting to fp32af052ef -
Update README.md
Verified signaturef55f609 -
Upload openNemo.jpg
Verified signaturef1ff883 -
Delete safety.md
Verified signature27463d9 -
Delete privacy.md
Verified signature75c8978 -
Delete bias.md
Verified signature4ac0d6a -
Delete explainability.md
Verified signatured41e41a -
Rename modeling_nemotron_h2.py to modeling_nemotron_h.py
Verified signaturef3412aa -
Rename modeling_nemotron_h.py to modeling_nemotron_h2.py
Verified signature5013700
-
Update modeling_nemotron_h.py
Verified signature41d8196 -
Update modeling_nemotron_h.py
Verified signature64e8a4d -
Update modeling_nemotron_h.py
Verified signature3157fc6 -
Update modeling_nemotron_h.py
Verified signature35b2126 -
Update modeling_nemotron_h.py
Verified signature807a97e -
Update modeling_nemotron_h.py
Verified signatureeef9321 -
Update modeling_nemotron_h.py
Verified signature75a72c9 -
Update modeling_nemotron_h.py
Verified signature2fdabe1 -
Update modeling_nemotron_h.py
Verified signaturede2e387 -
Update modeling_nemotron_h.py
Verified signaturef688ad3 -
Update modeling_nemotron_h.py
Verified signature95faeef -
Update modeling_nemotron_h.py
Verified signaturec994ca6 -
Changed aliases into propertys to prevent crashes on PEFT
Verified signature1d3ffcd -
Fixed _update_model_kwargs_for_generation
Verified signature0b7b1f5 -
Fixed attention_mask during gen
Verified signature1ef2011 -
Update modeling_nemotron_h.py
Verified signature49e0d24 -
Update modeling_nemotron_h.py
Verified signature2bef501 -
added Self Attn and MLP
Verified signatureb2fb464 -
Update configuration_nemotron_h.py
Verified signature7bc5b3b -
Update configuration_nemotron_h.py
Verified signatureAdded self.self_attn and self.mlp55a81bb -
Delete acc-vs-budget.png
Verified signature39b4ccb -
Delete accuracy_chart.png
Verified signature63b04ac -
Update modeling_nemotron_h.py
Verified signaturebd57040 -
Update configuration_nemotron_h.py
Verified signature47988f2 -
Update README.md
Verified signature9d8909b -
Update README.md
Verified signaturee388151 -
Update README.md
Verified signature6d3ef83 -
Duplicate from nvidia/NVIDIA-Nemotron-Nano-9B-v2
Co-authored-by: Yoshi Suhara <suhara@users.noreply.huggingface.co>726a566