ChemPhi-Mini

ChemPhi-Mini is a lightweight chemistry-focused reasoning model fine-tuned from unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit using supervised fine-tuning (SFT).

This project explores efficient domain adaptation for educational AI systems under constrained hardware environments. The goal was to build a compact chemistry tutoring and reasoning assistant capable of running locally with minimal GPU resources while maintaining useful scientific explanation capabilities.


Project Goals

This project was built to explore:

  • Parameter-efficient fine-tuning (PEFT)
  • Low-resource LLM training workflows
  • Chemistry-focused educational reasoning
  • Lightweight local AI systems
  • Quantized inference and deployment
  • Linux-based AI experimentation

The model is part of a broader self-hosted AI and systems engineering learning workflow involving:

  • Linux infrastructure
  • Local inference pipelines
  • GPU-constrained experimentation
  • Open-source AI tooling

Base Model

Base model used:

unsloth/phi-4-mini-reasoning-unsloth-bnb-4bit

Core characteristics:

  • Phi-4 Mini Reasoning architecture
  • 4-bit quantized
  • Optimized using the Unsloth ecosystem
  • Designed for efficient fine-tuning and inference

Training Method

This model was fine-tuned using:

  • LoRA (Low-Rank Adaptation)
  • PEFT
  • TRL SFTTrainer
  • 4-bit quantization
  • Supervised Fine-Tuning (SFT)

Training focused on:

  • Chemistry explanations
  • Conceptual reasoning
  • Educational QA
  • Scientific response formatting

Hardware & Environment

Training environment:

  • Google Colab
  • NVIDIA T4 GPU
  • CUDA-enabled PyTorch stack

This project specifically explored practical AI development under limited VRAM conditions.


Tech Stack

  • Transformers
  • TRL
  • PEFT
  • Unsloth
  • PyTorch
  • Hugging Face ecosystem

Framework versions:

  • PEFT 0.19.1
  • TRL 0.24.0
  • Transformers 5.5.0
  • PyTorch 2.10.0+cu128
  • Datasets 4.3.0
  • Tokenizers 0.22.2

Example Usage

from transformers import pipeline

generator = pipeline(
    "text-generation",
    model="rish3on3AI/ChemPhi-Mini",
    device="cuda"
)

messages = [
    {
        "role": "user",
        "content": "Explain why increasing temperature favors endothermic reactions."
    }
]

output = generator(
    messages,
    max_new_tokens=256,
    return_full_text=False
)

print(output[0]["generated_text"])
Downloads last month
27
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support