dana-nemo-4b

A 4B-parameter causal language model based on the Nemotron-H architecture, released in FP8 quantized format.

Model Details

  • Architecture: NemotronHForCausalLM (hybrid Mamba/Attention)
  • Parameters: ~4B
  • Hidden size: 3136
  • Layers: 42
  • Attention heads: 40 (8 KV heads)
  • Context length: 262,144 tokens
  • Vocabulary size: 131,072
  • Precision: FP8 (weights and KV cache), bfloat16 compute dtype
  • License: NVIDIA Nemotron Open Model License

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "<org>/dana-nemo-4b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, device_map="auto")

messages = [{"role": "user", "content": "Hello!"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
output = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))

This model requires trust_remote_code=True due to the custom Nemotron-H modeling code included in this repository.

License

This model is released under the NVIDIA Nemotron Open Model License.

Downloads last month
410
Safetensors
Model size
4B params
Tensor type
F32
BF16
F8_E4M3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support

Model tree for nguyennm1024/dana-nemo-4b

Unable to build the model tree, the base model loops to the model itself. Learn more.