Configuration Parsing Warning: Invalid JSON for config file config.json

Nemotron Translation Model (EN ↔ VI)

This is a merged model combining the NVIDIA Nemotron Nano 9B base model with fine-tuned LoRA adapters for English-Vietnamese translation.

Model Details

  • Base Model: nvidia/NVIDIA-Nemotron-Nano-9B-v2
  • Adapter Path: ./model_nemo/checkpoint-49500
  • Task: Bidirectional Translation (English ↔ Vietnamese)
  • Model Type: Causal Language Model with merged LoRA weights

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
    "pythera/Nemotron_translation",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("pythera/Nemotron_translation", trust_remote_code=True)

# Translate English to Vietnamese
messages = [
    {"role": "system", "content": "/no_think"},
    {"role": "user", "content": 'Dịch câu sau sang tiếng Việt: "Hello, how are you?"'},
]

inputs = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt"
).to(model.device)

with torch.no_grad():
    outputs = model.generate(
        inputs,
        max_new_tokens=256,
        temperature=0.1,
        do_sample=False,
    )

response = tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True)
print(response)

Translation Directions

English to Vietnamese (EN → VI)

messages = [
    {"role": "system", "content": "/no_think"},
    {"role": "user", "content": 'Dịch câu sau sang tiếng Việt: "Your English text here"'},
]

Vietnamese to English (VI → EN)

messages = [
    {"role": "system", "content": "/no_think"},
    {"role": "user", "content": 'Translate the following sentence into English: "Văn bản tiếng Việt của bạn ở đây"'},
]

Training Details

This model was fine-tuned using LoRA (Low-Rank Adaptation) on translation datasets. The LoRA adapters have been merged with the base model for easier deployment and faster inference.

License

Apache 2.0

Citation

If you use this model, please cite:

@misc{nemotron-translation,
  author = {Your Name},
  title = {Nemotron Translation Model},
  year = {2026},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/pythera/Nemotron_translation}},
}
Downloads last month
30
Safetensors
Model size
9B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Ripefog/Nemotron_translation