Text Generation
PEFT
Safetensors
English
mistral
fine-tuned
qlora
solar
manufacturing
faq
conversational
Instructions to use ankur1423/Fine-Tune-Mistral-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ankur1423/Fine-Tune-Mistral-7B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Mistral-7B Solar Manufacturing FAQ — Fine-tuned
Fine-tuned version of Mistral-7B-Instruct-v0.3 on a solar module manufacturing FAQ dataset (302 Q&A pairs) using QLoRA.
Model Details
- Base model: mistralai/Mistral-7B-Instruct-v0.3
- Fine-tuning method: QLoRA (4-bit NF4 + LoRA adapters)
- Task: Solar module manufacturing FAQ assistant
- Language: English
- License: Apache 2.0
- Developed by: ankur1423
How to Get Started
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
import torch
model_id = "ankur1423/Fine-Tune-Mistral-7B"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are an expert assistant for solar module manufacturing. Answer questions clearly and accurately based on industry knowledge."},
{"role": "user", "content": "What is EL testing?"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.3, top_p=0.9, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Training Details
Dataset
| Item | Value |
|---|---|
| Domain | Solar module manufacturing |
| Format | 302 instruction-output Q&A pairs (Alpaca) |
| Split | 286 train / 16 eval |
LoRA Configuration
| Parameter | Value |
|---|---|
| Rank (r) | 16 |
| Alpha | 32 |
| Dropout | 0.05 |
| Target modules | q/k/v/o_proj, gate/up/down_proj |
| Trainable params | 41,943,040 (0.58%) |
Training Hyperparameters
| Parameter | Value |
|---|---|
| Epochs | 5 |
| Learning rate | 1e-4 |
| Batch size | 2 (effective 8 with grad_accum=4) |
| Optimizer | paged_adamw_32bit |
| LR scheduler | cosine |
| Max seq length | 512 |
| Quantization | 4-bit NF4 + double quant, bfloat16 |
Infrastructure
- Platform: Kaggle — NVIDIA Tesla T4 (15.6 GB VRAM)
- Training time: ~15–25 minutes
Uses
Solar manufacturing Q&A: cell technologies (PERC, TOPCon, HJT), quality testing (EL, IV curves), defect modes (hot spots, delamination, PID), manufacturing processes.
Out-of-scope: general QA, code generation, topics outside solar manufacturing.
Limitations
Small dataset (302 examples) — may hallucinate on edge cases. Domain-specific only.
Citation
@misc{ankur1423-solar-faq-mistral,
title = {Mistral-7B Solar Manufacturing FAQ Fine-tune},
author = {ankur1423},
year = {2026},
url = {https://huggingface.co/ankur1423/Fine-Tune-Mistral-7B}
}
- Downloads last month
- -
Model tree for ankur1423/Fine-Tune-Mistral-7B
Base model
mistralai/Mistral-7B-v0.3 Finetuned
mistralai/Mistral-7B-Instruct-v0.3