Fine-Tuning a Local LLM for Thermoelectric Generators with QLoRA: From Generalist to Specialist
Description
This work establishes a large language model (LLM) specialized in the domain of ther-
moelectric generators (TEGs), for deployment on local hardware. Starting with the gener-
alist JanV1-4B model and Qwen3-4B-Thinking-2507 models, an efficient fine-tuning (FT)
methodology using quantized low-rank adaptation (QLoRA) was employed, modifying
only 3.18% of the total parameters of thee base models. The key to the process is the use
of a custom-designed dataset, which merges deep theoretical knowledge with rigorous
instruction tuning to refine behavior and mitigate catastrophic forgetting. The dataset
employed for FT contains 202 curated questions and answers (QAs), strategically balanced
between domain-specific knowledge (48.5%) and instruction-tuning for response behavior
(51.5%). Performance of the models was evaluated using two complementary benchmarks:
a 16-question multilevel cognitive benchmark (94% accuracy) and a specialized 42-question
TEG benchmark (81% accuracy), scoring responses as excellent, correct with difficulties, or
incorrect, based on technical accuracy and reasoning quality. The model’s utility is demon-
strated through experimental TEG design guidance, providing expert-level reasoning on
thermal management strategies. This study validates the specialization of LLMs using
QLoRA as an effective and accessible strategy for developing highly competent engineering
support tools, eliminating dependence on large-scale computing infrastructures, achieving
specialization on a consumer-grade NVIDIA RTX 2070 SUPER GPU (8 GB VRAM) in 263 s.
Files
applsci-15-13242-1.pdf
Files
(2.4 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:315faea933d2ed31700cb47af8d50bb2
|
2.4 MB | Preview Download |