I’m currently working on a project to build a dedicated Graphical User Interface (GUI) for fine-tuning AI agents, specifically focusing on the RAG (Retrieval-Augmented Generation) Teacher-to-Student method.
The goal of this tool is to simplify the pipeline where a larger, robust “Teacher” model (leveraging RAG for highly accurate, domain-specific context) generates high-quality QA pairs and synthetic data to fine-tune a smaller, highly efficient “Student” model.
I am designing the GUI to handle:
Data Ingestion: Uploading, chunking, and embedding documents for the RAG vector store.
Teacher Configuration: Setting up the Teacher LLM’s system prompts, generation parameters, and retrieval settings.
Student Fine-Tuning: Managing the actual training loop (e.g., configuring LoRA/QLoRA parameters, tracking loss, and exporting the final weights).
Developing for AMD Hardware: Since I want this pipeline to run as efficiently as possible on AMD hardware, I am actively looking into ROCm optimizations. Running a Teacher model for inference while simultaneously training a Student model can be incredibly VRAM-intensive.
I’d love to get the community’s thoughts on a few things:
ROCm Optimizations: Are there any recommended strategies or libraries for managing VRAM effectively when running concurrent inference (Teacher) and training (Student) workloads on AMD GPUs?
Open-Source Integrations: Are there specific AMD-optimized libraries you highly recommend integrating into this pipeline?
I’ll be sharing updates and open-sourcing the progress as it comes along. Looking forward to hearing your feedback and advice!
Hi, this is a great project, just couple suggestions from my side. If you’re running both models on the same AMD GPU, doing it at the same time will likely cause Out Of Memory (OOM) crashes. Instead of concurrent runs, use vLLM with FP8 quantization to generate a batch of synthetic data first, save it, and shut it down before starting the training loop. For the Student training, you should absolutely integrate Unsloth, which now officially supports ROCm and cuts VRAM usage by up to 80%.
You are right, bro. Running the teacher and student models simultaneously is actually a bottleneck—I just experienced that firsthand. I have to shut down the teacher model after generating the datasets before I can train the student model. Thank you for the advice!
As for my current progress, the RAG teacher-student method is working now. I might release the fine-tuning GUI this week, but I think I need to study Unsloth and integrate it first. Thank you!
If you’re serving your workloads on consumer Radeon, go with vLLM + FP8 - Hakob is right. On Instinct either engine works, but SGLang is worth a look if you go for K samples per chunk or multi-step teacher prompting. That’s where SGLang’s Radix cache beats vLLM’s hash-block approach.
The Unsloth and LoRA integration is working perfectly, and I plan to release it tomorrow. There are still a few things that need polishing, so I would highly appreciate your feedback. I welcome negative feedback especially, so that we can address any issues immediately. Additionally, I would be grateful for any tips, suggestions, or advice regarding fine-tuning. Thank you so much!
Current Issues:
Only two fine-tuning methods—LoRA and Unsloth—are properly functioning at this time. The others are still in development.
The GPU server on DigitalOcean is failing to render or create properly, only showing the current GPU.
Embeddings are currently tied to Featherless AI and lack integration with local embeddings or alternative providers.
you have LoRA and Unsloth working, thats already really good. For your launch, I’d suggest adding a simple dataset format validator in the GUI, because bad JSON or text formatting is the number one reason why users’ fine-tuning runs fail.
As you may know the “VF” in MI350X VF means you’re running on a Virtual Function. In virtualized cloud servers, rocm-smi is blocked from reading hardware telemetry by the host, which is why only the device name shows up. Your UI is probably fine, it’s just a limitation of cloud VMs.
For an easy local alternative to Featherless, try integrating Ollama’s embeddings API or Hugging Face’s TEI (Text Embeddings Inference). Both have great ROCm support, are super lightweight, and won’t steal VRAM from your training.
1.) I hadn’t thought about that. That’s excellent advice, and I will definitely add a dataset format validator. Thank you!
2.) For some reason, after reading the DigitalOcean documentation and trying their CLI, it failed to create a GPU server in any region I selected. However, through their web interface, I can create one easily. I’m not sure why that is, but as long as it works, I suppose it’s fine.
3.) I will definitely integrate this as well. Thank you for the suggestions.
**The Complete Guide to Fine-Tune Studio: RAG Teacher-Student Distillation & Training
**
Fine-Tune Studio is a desktop application built on React, TypeScript, and Rust (via Tauri) designed to simplify large-scale LLM training and data distillation on AMD Instinct™ GPU servers (including MI300X and MI350X architectures).
By combining concurrent vector ingestion, multimodal text extraction, automated teacher-student distillation, and Hugging Face model uploads, Fine-Tune Studio enables developers to easily build private reasoning models from raw files or pre-existing datasets.
High-Level Architecture Overview
Fine-Tune Studio operates under two main workflows:
1. The RAG Teacher-Student Distillation Method
Instead of training a model on generic text, you build a specialized dataset using your private files:
Document Ingestion: Private documents (PDFs, images) are parsed by PaddleOCR and embedded using a cluster of Qwen 8B Embedding models.
Vector Storage: Embeddings are stored inside a Qdrant database.
Conversational Synthesis: A high-parameter Teacher Model (e.g., Qwen 2.5 72B) uses RAG to query the Qdrant database, synthesizes answers, and generates a conversational instruction-tuning dataset.
Distillation: A smaller, lightweight Student Model (e.g., Qwen 7B) is fine-tuned on this custom dataset.
2. The Direct Method
If you already have a structured dataset on Hugging Face (public or private), you bypass the RAG stage and proceed directly to training the student model.
Step 1: Credentials & GPU Server Uplink
Before creating pipelines, configure your credentials to authenticate with DigitalOcean, Hugging Face, and your remote GPU server.
If you do not have an existing GPU server, you can create one directly through the Tauri app:
Go to the GPU Servers tab.
Input your DigitalOcean API Token.
Click Sync Account to load available plans, images, projects, and SSH keys.
Select one of the pre-configured AMD Instinct GPU sizes (such as gpu-mi350x1-288gb or gpu-mi300x1-192gb).
Choose the ROCm™ Software image (e.g., ROCm 7.2 on Ubuntu 24.04, ID: 220895104).
Select your target SSH Keys and click Create GPU Server.
2. Server Uplink Configuration
Navigate to the Credentials page and configure the following:
Hugging Face API Key: Necessary to retrieve private datasets, download gated models, and automatically upload your trained models and datasets back to Hugging Face.
GPU Server IP Address: Enter the public IP address of your GPU server (e.g., 165.245.135.34).
SSH Credentials: Choose root as the username, specify the port (default 22), and select the path to your private key file (e.g., C:\Users\Zrald\.ssh\gpu_server).
Click Test System Uplink to verify the Tauri app can establish a connection and communicate with the Docker daemon on the server.
TIP
Successful connection will display ROCm SMI status info (device ID, GUID, VRAM usage, and active temperatures) in the console log.
Step 2: The RAG Teacher-Student Pipeline
This method allows you to convert unformatted files (such as manuals, textbooks, or scanned images) into a polished conversational dataset.
| Document Ingestion |
| Raw Files -> PaddleOCR -> Qwen 8B Embedder -> Qdrant |
+-------------------------+--------------------------+
|
v
+----------------------------------------------------+
| Teacher Dataset Generation |
| Teacher Model (RAG Query) -> Synthesized QA Data |
+-------------------------+--------------------------+
|
v
+----------------------------------------------------+
| Student Training |
| Fine-Tuning on Synthesized Dataset via Unsloth/LoRA|
+----------------------------------------------------+
1. Deploying the Ingestion Cluster
Navigate to the Pipeline page and click Detect GPU. Fine-Tune Studio will detect your hardware (e.g., 1x AMD MI350X with 288GB VRAM) and optimize the cluster setup.
In the Knowledge Ingestion section:
Deploy Qdrant: Spins up a Qdrant container running on port 6333.
Deploy PaddleOCR: Deploys a Baidu PaddleOCR container running on port 8080 to parse scanned images and PDFs.
Create Multiple Embedders: Set up multiple concurrent embedding endpoints running Qwen 8B Embedder models (e.g., port 8101 and 8102).
Concurrency: You can set the number of concurrent connections per embedder to maximize throughput on high-bandwidth AMD Instinct hardware.
NOTE
If you already have an existing vector database, select the Qdrant Only option to skip embedding generation and restore directly from a Qdrant snapshot.
2. Ingesting Documents
Upload your PDF, TXT, or image files.
The system automatically triggers the extraction pipeline:
Documents are chunked into logical passages.
PDFs and images undergo OCR processing if needed.
Text blocks are distributed concurrently across all active Qwen embedders.
Embeddings are stored as vectors in Qdrant.
3. Deploying the Teacher Model
Once your database is populated, configure the Teacher Model:
Select a model from the preset list (e.g., Qwen/Qwen3.6-35B-A3B or Qwen/Qwen2.5-72B-Instruct) or input a custom Hugging Face model repository.
The Tauri app starts the container (e.g., rocm-vllm using vLLM ROCm image or rocm-sglang using SGLang ROCm image) and loads the weights.
The teacher model executes RAG prompts, retrieves relevant facts from Qdrant, and writes a clean conversational dataset (formatted in standard ShareGPT/Alpaca formats) directly to the server storage.
Step 3: Direct Training Method
If you already have pre-packaged training datasets uploaded on Hugging Face (e.g., private training JSON files or public datasets), select the Direct training option.
Select Dataset: Choose between a Public Dataset (paste the Hugging Face repo path) or a Private Dataset (which uses your configured Hugging Face access token).
Verify Dataset: The app checks the structure (ensuring it matches keys like instruction, input, output or standard conversation formats).
Step 4: Fine-Tuning the Student Model
Whether your dataset was generated via RAG distillation or loaded directly, you are now ready to train your student model:
Select Student Model: Pick your student model (e.g., Qwen/Qwen2.5-7B-Instruct).
Configure Parameters:
Fine-Tuning Method: Choose your optimization method:
Resume Capabilities: Fine-Tune Studio automatically saves checkpoints at regular intervals. If a network interruption occurs, you can resume training from the last saved checkpoint without losing progress.
Once training is complete, the application performs post-processing steps:
Adapter Weight Copy-Back: The Tauri backend securely copies the trained LoRA adapter weights from the remote Docker container back to the host filesystem, preventing them from being deleted during container cleanups.
Hugging Face Hub Upload: If selected, the app pushes the trained weights automatically to your Hugging Face account.
GGUF Conversion:
You can choose to automatically convert the trained model to GGUF format (e.g., Q4_K_M or Q8_0).
This merges the LoRA adapter with the base model and outputs a single .gguf file ready for local edge deployment (e.g., on LM Studio, Ollama, or llama.cpp).
Any feedback is welcome. Please feel free to share any techniques, advice, or suggestions to improve Fine-Tune Studio’s RAG teacher-student method. Thank you!
Hi, this is a truly exciting project! Just a couple suggestions from my side. If you’re running both models on the same AMD GPU, doing it at the same time will likely cause Out Of Memory (OOM) crashes. Instead of concurrent runs, use vLLM with FP8 quantization to generate a batch of synthetic data first, save it, and shut it down before starting the training loop. For the Student training, you should absolutely integrate Unsloth, which now officially supports ROCm and cuts VRAM usage by up to 85
This is an interesting approach, especially the idea of using a RAG-based Teacher to generate high-quality data for a smaller Student model. The main challenge with running both workloads concurrently on AMD GPUs seems to be managing VRAM efficiently.
For the ROCm side, I think it would be useful to monitor memory usage closely and experiment with batch sizes, sequence lengths, and quantization before increasing concurrency. LoRA or QLoRA could also help keep the Student training workload more manageable.
I would also be interested in seeing how your GUI handles the separation between retrieval, Teacher inference, dataset generation, and Student training. Making those stages independently configurable could make the tool useful for different hardware configurations.
It would be great to see your benchmarks comparing Teacher-only inference, Student-only training, and concurrent workloads on AMD GPUs.
Thank you bro for appreciating my work, I’ll definitely integrate your ideas to my next update thank you so much, i will add live progress and usage while generating datasets.
Yes bro, i will add automatic benchmark after training .
Yes i like your idea of having sperate hardware configuration like a dedicated for teachers model and a dedicated for student model.