safetensors qwen2 region:us
---
{}
---
## Model: FINGU-AI/Qwen2.5-Orpo

### Usage

```python
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)
```

### Model Details

- **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 based on available hardware (e.g., GPU/CPU)

### Example Use Case

This 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."

### Model Inputs

- **Prompt**: Text input asking for translation (Korean to Uzbek).
- **Tokenization**: The `apply_chat_template` is used to structure the input for a conversational AI use case.

### Output

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.
