File size: 1,559 Bytes
61a8b19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
base_model: gyubinc/sft
library_name: transformers
pipeline_tag: text-generation
tags:
- generated_from_trainer
- trl
- minillm
- opd
- kanana
license: other
---

# kaana-if-opd

This is an open text-generation model fine-tuned from `gyubinc/sft` with OPD/TRL.

## Training

- Student/base model: `gyubinc/sft`
- Teacher model: `gyubinc/autoif`
- Dataset: `gyubinc/IF`
- Method: OPD / MiniLLM-style distillation (`distill_mode=tml`)
- Precision: bfloat16
- Training checkpoint: `checkpoint-50`
- Max planned steps: 100
- Saved global step: 50
- Effective batch size: 128
- Learning rate: 1e-6
- Max prompt length: 1024
- Max completion length: 2048

The source run was interrupted after step 62, and the latest complete saved Hugging Face checkpoint available locally was step 50. This repository contains only inference artifacts and excludes DeepSpeed optimizer state, RNG state, and trainer-resume files.

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "riasok/kaana-if-opd"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

prompt = "Write a concise answer: What is instruction following?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

## Framework Versions

- TRL: 0.26.0
- Transformers: 4.57.1
- PyTorch: 2.8.0
- Datasets: 3.6.0
- Tokenizers: 0.22.2