File size: 4,248 Bytes
0bdcecc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f77607f
 
 
81e2f47
f77607f
 
 
 
 
 
 
 
 
 
47d6a16
 
f77607f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47d6a16
f77607f
47d6a16
f77607f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
---
base_model:
- Qwen/Qwen2.5-7B-Instruct
library_name: transformers
pipeline_tag: text-generation
language:
- lua
license: apache-2.0
tags:
- fivem
- qbcore
- lua
- gta-v
- gta5
- game-development
- code-generation
- code
- qwen2
- qwen2.5
- qwen-coder
- fine-tuned
---

# Rooja

**Rooja** is a fine-tuned version of
**Qwen2.5-7B-Instruct**, specialized for **FiveM development,
Lua scripting, QBCore, and GTA V server development**.

Rooja is designed to act as a coding assistant for developers building
and maintaining FiveM resources.

## Model Details

| Property | Value |
|---|---|
| Model | Rooja |
| Base Model | Qwen/Qwen2.5-7B-Instruct |
| Parameters | ~7B |
| Fine-tuning Method | QLoRA |
| LoRA Rank | 64 |
| LoRA Alpha | 128 |
| LoRA Dropout | 0.05 |
| Quantization During Training | 4-bit NF4 |
| Double Quantization | Enabled |
| Maximum Training Sequence Length | 8192 |
| Training Epochs | 2 |
| Learning Rate | 1e-4 |
| Effective Batch Size | 16 |
| Optimizer | paged_adamw_8bit |
| Learning Rate Scheduler | cosine |
| Gradient Checkpointing | Enabled |

## Training Dataset

The training run contained:

- **5,969 total examples**
- **4,460 training examples**
- **1,509 validation examples**

The dataset was created for FiveM-oriented coding and development tasks.

## Training Results

Final training results:

| Metric | Result |
|---|---:|
| Final Training Loss | 0.4496 |
| Final Training Token Accuracy | ~91.6% |
| Final Validation Loss | 0.5274 |
| Final Validation Token Accuracy | ~88.0% |
| Epochs | 2 |

The training run completed successfully after 2 epochs.

## What Rooja Is Designed For

Rooja is intended to help with:

- FiveM Lua development
- QBCore scripting
- GTA V server development
- Client-side Lua
- Server-side Lua
- FiveM resources
- `fxmanifest.lua`
- QBCore events and callbacks
- Player and character systems
- Server/client communication
- Configuration files
- Debugging
- Code explanation
- Code generation
- Resource architecture
- FiveM development workflows

## Example Prompt

```text
Create a QBCore FiveM server-side command that gives
cash to another player.

Validate the target player and amount and make sure the
command cannot be abused with invalid values.
```

## Usage

### Transformers

```python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "lone17k/Rooja"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto"
)

messages = [
    {
        "role": "user",
        "content": "Create a basic FiveM QBCore server-side command."
    }
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)

inputs = tokenizer(
    text,
    return_tensors="pt"
).to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=512,
    temperature=0.2
)

response = tokenizer.decode(
    outputs[0][inputs["input_ids"].shape[-1]:],
    skip_special_tokens=True
)

print(response)
```

## Recommended Generation Settings

For code generation, a low temperature is recommended.

```text
temperature: 0.1 - 0.3
top_p: 0.8 - 0.95
```

For deterministic coding:

```text
temperature: 0.2
```

## Limitations

Rooja may generate incorrect, incomplete, or outdated FiveM and
QBCore APIs.

FiveM resources and frameworks can change over time. Generated code
should therefore be reviewed and tested before being deployed to a
production server.

Rooja should be treated as a coding assistant and not as an
authoritative source of FiveM documentation.

## Base Model

Rooja is based on:

**Qwen/Qwen/Qwen2.5-7B-Instruct**

The original Qwen/Qwen2.5-7B-Instruct model contains approximately
14.7B parameters and supports long-context usage. Its Hugging Face
model card currently identifies the model as Apache-2.0 licensed. 

For the original model and its license, see:

https://huggingface.co/Qwen/Qwen2.5-Coder-14B-Instruct

## Creator

Created and fine-tuned by **Lone17k**.

Hugging Face:

https://huggingface.co/lone17k

Model:

https://huggingface.co/lone17k/Rooja

## Disclaimer

This project is an independent fine-tune and is not affiliated with
Qwen, Alibaba Cloud, FiveM, or Rockstar Games.