Downloads · 30 days
0
opendatalab/belt_road_hungarian_beta2
belt_road_hungarian_beta2 is a machine learning model from opendatalab. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a conversational and instruction-following large language model, fine-tuned from the foundational open-source Qwen2.5-72B-Instruct model using supervised fine-tuning (SFT).
Downloads · 30 days
0
Access
Public
Updated Sep 9, 2025
Repo size
145 GB
Likes
0
Public
Click a slice to open those files.
.safetensors145 GB · 100%
From the Hugging Face model README
This model is a conversational and instruction-following large language model, fine-tuned from the foundational open-source Qwen2.5-72B-Instruct model using supervised fine-tuning (SFT).
device_map="auto" is necessary to distribute them across multiple cards.torch: 2.1 or highertransformers: 4.41.0 or higheraccelerate: 1.7.0 or highereinops: 0.8.1 or highersentencepiece: 0.2.0 or higherThe recommended method for loading and running the model is by using the transformers library.
# Example code snippet for inference using transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Specify the model path or your Hugging Face Hub repository
model_path = "your-huggingface-repo/your-model-name" # e.g., "your-user/your-qwen-model"
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_path)
# Load the model with device_map to distribute it across available GPUs
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16, # or torch.float16
device_map="auto"
)
# Example conversation prompt
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, can you translate 'hello' to Hungarian and Chinese?"}
]
# Apply the chat template and generate a response
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.9
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)