Qwen2.5-7B Indonesia Reasoning Model

Summary

  • Developer: MMumtazSakho
  • Lisence: apache-2.0
  • Finetuned from model: Qwen2.5-7B
  • Fine tuning device: (1xNvidia RTX 4060 8 GB)
  • Inference Requirement: You need at least 8 GB GPU Memory to run this model.

LoRA Params

  • r (rank): 32
  • lora_alpha: 16
  • lora_dropout: 0

Training Params

  • Epochs: 3
  • optim: adamw_8bit
  • learning_rate: 2e-4

Training Resource

  • Time: 8 Hours
  • Reserved GPU Memory: 7.8 GB

How to use

Below is an example of how to load and use a model via Unsloth:

from unsloth import FastLanguageModel

from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
        model_name = "MMumtazSakho/qwen2.5-7B-indo-reasoning-distill-o1-Lora", 
        max_seq_length = 2048,
        dtype = None,
        load_in_4bit = True,
    )
FastLanguageModel.for_inference(model) 

alpaca_prompt = """You are an AI assistant. Format your answers as follows: <Thought> Your thoughts (understanding, reasoning) </Thought> <output> Your answer </output>

### Instruction:
{}

### Input:
{}

### Response:
{}"""

inputs = tokenizer(
[
    alpaca_prompt.format(
        """tahun ini, usia andi 2 kali usia budi. jika tahun ini usia andi 10 tahun, maka berapa tahun usia budi 5 tahun mendatang?""", 
        "", 
        "", 
    )
], return_tensors = "pt").to("cuda")

from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer)

_ = model.generate(
    **inputs, 
    streamer=text_streamer, 
    max_new_tokens=2048,  # diperbesar untuk CoT yang biasanya menghasilkan banyak token
    temperature=0.1
    )

Inference code on google colab: https://colab.research.google.com/drive/17sUAic1aSknMqTTB66nAmfxZEFvEvgfJ?usp=sharing

Output (before fine tuning with the same system prompt) (incorrect output)

<Thought> To solve this problem, we need to find the current age of Budi and then calculate his age 5 years from now. We know that Andi's current age is 10 years and that Andi's age is twice Budi's age. </Thought>

<output> 15 </output><|endoftext|>

Output (After fine tuning with the same system prompt) (correct output)

<Thought>
Baiklah, mari kita selesaikan masalah ini langkah demi langkah.

Pertama, mari kita pahami informasi yang diberikan:

1. Tahun ini, usia Andi adalah 2 kali usia Budi.
 2. Tahun ini, Andi berusia 10 tahun.
 3. Kita perlu mencari tahu usia Budi 5 tahun mendatang.

Mari kita sebut usia Budi saat ini sebagai "B".

Menurut titik pertama, usia Andi saat ini adalah 2 kali usia Budi. Jadi, kita bisa menulis persamaan:
Andi = 2 * B

Kita tahu bahwa Andi saat ini berusia 10 tahun:
10 = 2 * B

Sekarang, mari kita selesaikan untuk B:
Bagi kedua sisi dengan 2:
B = 10 / 2
B = 5

Jadi, Budi saat ini berusia 5 tahun.

Tapi pertanyaannya meminta usia Budi 5 tahun mendatang. Untuk menemukan itu, kita hanya perlu menambahkan 5 tahun ke usia Budi saat ini:
Usia Budi 5 tahun mendatang = B + 5
Usia Budi 5 tahun mendatang = 5 + 5
Usia Budi 5 tahun mendatang = 10 tahun

Oleh karena itu, Budi akan berusia 10 tahun dalam 5 tahun.
</Thought>

<Output>
10
</Output><|endoftext|>
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Dataset used to train MMumtazSakho/qwen2.5-7B-indo-reasoning-distill-o1-Lora