Downloads · 30 days
5
26% of all-time downloads
FINGU-AI/Qwen2.5-Orpo
Qwen2.5-Orpo is a machine learning model from FINGU-AI. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Model Name: FINGU-AI/Qwen2.5-Orpo - Type: Causal Language Model - Task: Text generation and translation (Korean to Uzbek) - Framework: PyTorch - Auto Tokenizer: Yes, using AutoTokenizer - Device: Auto configuration…
Downloads · 30 days
5
26% of all-time downloads
All-time downloads
19
Public
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model_name = "FINGU-AI/Qwen2.5-Orpo"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Define prompt
prompt = "Translate ko to uz: \n 그러나 충당부채는 결산일에 기업이 부담해야 할 의무가 명백히 존재하고 금액을 합리적으로 추정할 수 있다는 점에서 '우발부채와는 확실하게 차이가 있다.'"
# Prepare messages and text
messages = [
{"role": "system", "content": "You are helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
# Generate model inputs
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# Generate response
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
# Decode the response
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
AutoTokenizerThis model supports translation from Korean to Uzbek. In the given example, the input is a sentence in Korean, and the model translates it into Uzbek. The system role is set up as "You are a helpful assistant."
apply_chat_template is used to structure the input for a conversational AI use case.The model generates a translated response in Uzbek, utilizing the AutoModelForCausalLM for causal language modeling and generation. The result is decoded and presented in a readable format.