odenmehmet/trobject_llama-3_8b_unsloth_2x_faster_finetuning
TRObject LLaMA-3 8B Code Generation Model
This repository contains a domain-specific fine-tuned LLaMA-3 8B model for generating TRObject code from natural language prompts.
TRObject is used in the Clomosy mobile application development platform. The goal of this model is to help users generate copy-ready TRObject code snippets for common mobile UI and application-development tasks.
Project Motivation
General-purpose LLMs do not reliably understand TRObject syntax, Clomosy-specific UI patterns, or platform-specific development workflows.
To address this gap, I created a custom instruction-style dataset and fine-tuned a LLaMA-3 8B model for TRObject code generation.
The project focuses on:
- Natural language to TRObject code generation
- Mobile UI component generation
- Form, button, input, event, and database-related code snippets
- Domain-specific adaptation of a general-purpose LLM
Base Model and Fine-Tuning
- Base model:
unsloth/llama-3-8b-bnb-4bit - Architecture: LLaMA-3 8B
- Fine-tuning method: Supervised fine-tuning with LoRA adapters
- Optimization: 4-bit quantization with Unsloth
- Libraries: Hugging Face Transformers, TRL, Unsloth, PEFT/LoRA
Dataset
The model was fine-tuned on a custom instruction-style dataset containing natural language prompts and corresponding TRObject code outputs.
Dataset format:
The dataset includes examples for:
- Form creation
- Button and input field creation
- Click event definitions
- Login/register UI flows
- SQLite query usage
- ListView data loading
- UI component configuration
Dataset repository:
odenmehmet/TRObject-Dataset-Test
Example Prompts and Outputs
Example 1 — Create a form input
Prompt
Form oluştur ve bir edit alanı ile buton ekle.Output style
MyForm = TclForm.Create(Self);
testEdit = MyForm.AddNewEdit(MyForm,'testEdit','Barcode here ...');
testEdit.Align = alTop;
testEdit.Height = 40;
testBtn = MyForm.AddNewButton(MyForm,'testBtn','Scan Barcode...');
testBtn.Align = alCenter;
testBtn.Height = 100;
testBtn.Width = 200;
MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');Example 2 — Add a button with a click event
Prompt
Buton ekle ve ona bir tıklama olayı ekle.Output style
testBtn = MyForm.AddNewButton(MyForm,'testBtn','Scan Barcode...');
testBtn.Align = alCenter;
testBtn.Height = 100;
testBtn.Width = 200;
MyForm.AddNewEvent(testBtn,tbeOnClick,'BtnOnClick');Example 3 — Create a login screen
Prompt
Bir giriş ekranı oluştur ve e-posta ve parola alanlarını ekle.Output style
myForm = TclForm.Create(Self);
EmailEdit = myForm.AddNewProEdit(MainPnl, 'EmailEdit', 'E-posta');
EmailEdit.Align = alTop;
EmailEdit.Height = 50;
ParolaEdit = myForm.AddNewProEdit(MainPnl, 'ParolaEdit', 'Parola');
ParolaEdit.Align = alTop;
ParolaEdit.Height = 50;
ParolaEdit.Password = True;Example 4 — Create a simple UI flow
Prompt
Bir form üzerinde kullanıcıdan isim alıp butona basınca işlem yapacak basit bir arayüz oluştur.Output style
MyForm = TclForm.Create(Self);
NameEdit = MyForm.AddNewEdit(MyForm, 'NameEdit', 'İsim giriniz');
NameEdit.Align = alTop;
NameEdit.Height = 40;
SubmitBtn = MyForm.AddNewButton(MyForm, 'SubmitBtn', 'Gönder');
SubmitBtn.Align = alTop;
SubmitBtn.Height = 45;
MyForm.AddNewEvent(SubmitBtn, tbeOnClick, 'SubmitBtnOnClick');Intended Use
This model is intended for:
- TRObject code generation experiments
- Domain-specific LLM fine-tuning demonstrations
- Educational use in custom code-generation workflows
- Assisting developers with repetitive Clomosy/TRObject UI patterns
Limitations
This model is experimental and should not be used as a fully autonomous code generator without human review.
Known limitations:
- May generate syntactically incorrect TRObject code for complex requests
- May hallucinate unsupported components or APIs
- Works better on patterns similar to the training data
- Requires developer validation before use in production
- Dataset size is limited, so generalization may be weak outside known TRObject patterns
Recommended Usage
Use the model as an assistant for generating draft TRObject snippets. All generated code should be manually reviewed and tested inside the Clomosy/TRObject development environment.
Data Safety Note
The dataset and examples should only include sanitized, non-sensitive, and non-confidential code samples.
Do not use private credentials, production data, customer data, or proprietary business logic in public examples.
Developer
Developed by Mehmet Öden as part of an AI/LLM internship project focused on domain-specific code generation for TRObject and Clomosy-style mobile application development.
