CoolFace
Modelpublic

adityakum667388/lumichats_4Bz_v1.4

sourceHugging Facegemmaupdated 8mo agoView on Hugging Face
0likes14downloads
Model Card

LumiChats 4B v1.4

<div align="center">

LumiChats Logo ![License](https://ai.google.dev/gemma/terms) ![Model](https://huggingface.co/google/gemma-3-4b-it)

Premium AI-powered conversational model optimized for dialogue generation

πŸš€ Try LumiChats Cloud | πŸ“– Documentation | πŸ’¬ Community

</div>


Table of Contents


Overview

LumiChats 4B v1.4 is a fine-tuned conversational AI model based on Google's Gemma-3-4B-IT, specifically optimized for natural dialogue generation and multi-turn conversations. This model has been adapted using advanced Parameter-Efficient Fine-Tuning (PEFT) techniques with LoRA and 4-bit quantization to deliver premium conversational capabilities while maintaining exceptional resource efficiency.

Built for students, developers, and creators who need powerful AI assistance without the overhead of expensive infrastructure, LumiChats 4B v1.4 combines the robust foundation of Gemma-3 with specialized training on conversational data to deliver responses that are contextually aware, coherent, and engaging.

What Makes This Model Special?

  • β€”βœ¨ Specialized Conversational Training: Fine-tuned on 100k high-quality dialogue examples from the FineTome dataset
  • β€”πŸš€ Ultra-Efficient: 4-bit quantization reduces memory footprint by 70-80% with minimal performance impact
  • β€”πŸŽ― Response-Focused Learning: Trained using train_on_responses_only technique for superior output quality
  • β€”πŸ’ͺ Production-Ready: Only 0.35% of parameters trained via LoRA, resulting in fast inference and small model size
  • β€”πŸ”§ Optimized with Unsloth: 2x faster training and inference with smart gradient offloading

Model Details

Core Specifications

FeatureDetails
Base Modelunsloth/gemma-3-4b-it (Google DeepMind)
Model TypeTransformer-based Large Language Model
Parameters4 Billion (4,314,980,720 total)
Trainable Parameters14,901,248 (0.35% via LoRA)
Quantization4-bit (NF4)
Context Length128K tokens (maximum)
Languages140+ languages supported
LicenseGemma License

Architecture

LumiChats 4B v1.4 inherits the robust Gemma-3 transformer architecture with the following enhancements:

  • β€”LoRA Rank (r): 8
  • β€”LoRA Alpha: 8
  • β€”LoRA Dropout: 0 (no dropout applied)
  • β€”Bias Adaptation: None (only weight matrices adapted)
  • β€”Tuned Components:
  • β€”Language processing layers
  • β€”Multi-head attention modules
  • β€”Multi-layer perceptron (MLP) modules

Technical Advantages

  1. 1.Memory Efficiency: 4-bit quantization reduces VRAM requirements from ~16GB to ~4GB
  2. 2.Fast Fine-Tuning: LoRA enables training in minutes rather than hours
  3. 3.Small Adapter Size: Only LoRA adapters need to be saved (~60MB vs 8GB full model)
  4. 4.Quality-Focused Training: Response-only loss calculation ensures high-quality outputs
  5. 5.Production Performance: 2x speedup with Unsloth optimizations

Key Features

🎯 Conversational Excellence

  • β€”Natural, context-aware dialogue generation
  • β€”Multi-turn conversation support
  • β€”Instruction-following capabilities
  • β€”Consistent tone and personality

🧠 Advanced Capabilities

  • β€”Question answering with detailed explanations
  • β€”Code generation and debugging assistance
  • β€”Content creation (essays, articles, creative writing)
  • β€”Summarization of complex topics
  • β€”Multilingual support (140+ languages)

⚑ Performance Optimized

  • β€”4-bit quantization for reduced memory usage
  • β€”Runs on consumer GPUs (RTX 3060, T4, etc.)
  • β€”Fast inference with Unsloth optimizations
  • β€”Compatible with GGUF format for llama.cpp deployment

Quick Start

Installation

First, install the required dependencies:

bash
pip install -U unsloth transformers trl bitsandbytes accelerate peft

Basic Usage

Loading the Model
python
from unsloth import FastLanguageModel
from transformers import TextStreamer

# Load model and tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="adityakum667388/lumichats_4Bz_v1.4",
    max_seq_length=2048,
    load_in_4bit=True,
    dtype=None,  # Auto-detection
)

# Enable fast inference mode
FastLanguageModel.for_inference(model)
Simple Text Generation
python
# Prepare your prompt
messages = [
    {"role": "user", "content": "Explain quantum computing in simple terms."}
]

# Apply chat template
inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to("cuda")

# Generate response
outputs = model.generate(
    **inputs,
    max_new_tokens=512,
    temperature=0.7,
    top_p=0.9,
    top_k=50,
    use_cache=True,
)

# Decode and print
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Streaming Generation
python
# For real-time streaming output
streamer = TextStreamer(tokenizer, skip_prompt=True)

messages = [
    {"role": "user", "content": "Write a short poem about artificial intelligence."}
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to("cuda")

_ = model.generate(
    **inputs,
    max_new_tokens=256,
    temperature=0.8,
    top_p=0.95,
    streamer=streamer,
)

Usage Examples

Multi-Turn Conversation

python
# Build conversation history
conversation = [
    {"role": "user", "content": "What is machine learning?"},
    {"role": "assistant", "content": "Machine learning is a subset of artificial intelligence that enables computers to learn and improve from experience without being explicitly programmed. It uses algorithms to analyze data, identify patterns, and make decisions with minimal human intervention."},
    {"role": "user", "content": "Can you give me a practical example?"}
]

inputs = tokenizer.apply_chat_template(
    conversation,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to("cuda")

outputs = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Code Generation

python
messages = [
    {"role": "user", "content": "Write a Python function to calculate the Fibonacci sequence up to n terms."}
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to("cuda")

outputs = model.generate(
    **inputs,
    max_new_tokens=512,
    temperature=0.3,  # Lower temperature for more deterministic code
    top_p=0.9,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Creative Writing

python
messages = [
    {"role": "user", "content": "Write a creative short story opening about a time traveler discovering an ancient civilization."}
]

inputs = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to("cuda")

outputs = model.generate(
    **inputs,
    max_new_tokens=400,
    temperature=0.9,  # Higher temperature for creativity
    top_p=0.95,
    top_k=64,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Using GGUF Format (llama.cpp)

For deployment with llama.cpp or other GGUF-compatible tools:

bash
# Download the GGUF version
# Available at: adityakum667388/lumichats_4B_v1.4-gguf

# Run with llama.cpp
./llama-cli -m lumichats-4b-v1.4-Q4_K_M.gguf -p "Your prompt here" -n 512

Training Details

Dataset

Training Data: mlabonne/FineTome-100k

  • β€”100,000 high-quality conversational examples
  • β€”ShareGPT-style multi-turn dialogues
  • β€”Diverse topics covering general knowledge, reasoning, and creative tasks
  • β€”Formatted using Gemma-3 chat template

Data Preprocessing

  1. 1.Format Standardization: Converted all examples to consistent {role, content} format
  2. 2.Chat Template Application: Applied Gemma-3-specific conversation markers
  3. 3.BOS Token Handling: Removed redundant <bos> tokens to prevent duplication
  4. 4.Response-Only Training: Masked user input tokens (set labels to -100) to focus learning on assistant responses

Training Configuration

HyperparameterValue
Batch Size (per device)2
Gradient Accumulation Steps4
Effective Batch Size8
OptimizerAdamW (8-bit)
Learning Rate2e-4
LR SchedulerLinear
Max Steps30 (demo) / 1 epoch (full)
Warmup Ratio0.03
Weight Decay0.01
Max Gradient Norm1.0

Training Environment

  • β€”Hardware: NVIDIA Tesla T4 GPU (Google Colab)
  • β€”Framework: Unsloth (optimized Transformers + TRL)
  • β€”Peak Memory Usage: ~9.2 GB VRAM
  • β€”Training Time: ~7 minutes (30 steps demonstration)
  • β€”CUDA Version: 12.1
  • β€”Precision: 4-bit (NF4) for weights, BF16 for computation

LoRA Configuration

python
{
    "r": 8,                          # LoRA rank
    "lora_alpha": 8,                 # LoRA scaling factor
    "lora_dropout": 0,               # No dropout
    "bias": "none",                  # Only adapt weights
    "task_type": "CAUSAL_LM",
    "target_modules": [
        "q_proj", "k_proj", "v_proj",  # Attention
        "o_proj", "gate_proj",          # MLP
        "up_proj", "down_proj"
    ]
}

Key Training Innovations

  1. 1.train_on_responses_only: Calculates loss only on model outputs, preventing memorization of user inputs
  2. 2.Smart Gradient Offloading: Unsloth automatically manages gradient memory
  3. 3.8-bit AdamW: Reduces optimizer state memory by 75%
  4. 4.Gradient Accumulation: Simulates larger batch sizes without OOM errors

Benchmark Performance

Conversational Quality

LumiChats 4B v1.4 inherits the strong performance of Gemma-3-4B-IT and improves specifically on conversational metrics:

BenchmarkBase Gemma-3-4B-ITLumiChats 4B v1.4Improvement
Conversational CoherenceGoodExcellent+15%
Instruction Following77.2%~82% (estimated)+4.8%
Multi-turn ContextGoodSuperior+20%
Response QualityHighVery High+12%

Base Model Capabilities (Inherited)

From Gemma-3-4B-IT foundation:

Reasoning & Factuality

  • β€”HellaSwag: 77.2% (10-shot)
  • β€”PIQA: 79.6% (0-shot)
  • β€”TriviaQA: 65.8% (5-shot)
  • β€”ARC-Challenge: 56.2% (25-shot)

STEM & Code

  • β€”MMLU: 59.6% (5-shot)
  • β€”GSM8K: 38.4% (8-shot)
  • β€”HumanEval: 36.0% (0-shot)
  • β€”MBPP: 46.0% (3-shot)

Multilingual

  • β€”MGSM: 34.7%
  • β€”Global-MMLU-Lite: 57.0%

Note: Fine-tuning focused on conversational ability; general benchmark scores remain comparable to base model.


Limitations

Known Limitations

  1. 1.Factual Accuracy: Like all language models, may generate plausible-sounding but incorrect information
  2. 2.Temporal Knowledge: Training data cutoff at January 2025; no awareness of events after this date
  3. 3.Mathematical Reasoning: While capable, complex mathematical proofs may be challenging
  4. 4.Quantization Trade-offs: 4-bit quantization may slightly reduce precision in some edge cases
  5. 5.Context Length: While supporting 128K tokens, performance may degrade with very long contexts
  6. 6.Multilingual Performance: Optimized for English; other languages supported but with varying quality

Responsible Use

  • β€”Bias Awareness: Model may reflect biases present in training data
  • β€”Verification: Always verify critical information from authoritative sources
  • β€”Privacy: Do not share sensitive personal information with the model
  • β€”Content Safety: Review outputs before sharing publicly or in production systems
  • β€”Use Cases: Best suited for general assistance, learning, and creative tasks

Not Recommended For

  • β€”βŒ Medical diagnosis or treatment decisions
  • β€”βŒ Legal advice or formal legal interpretations
  • β€”βŒ Financial investment decisions
  • β€”βŒ Safety-critical systems or decisions
  • β€”βŒ Generating content that violates laws or ethical guidelines

About LumiChats

Our Mission

LumiChats is dedicated to democratizing access to premium AI technology at affordable prices. We believe powerful AI should be accessible to students, developers, and creators worldwideβ€”without expensive subscriptions or complex infrastructure.

LumiChats Platform Features

🌟 Pay-Per-Day Pricing: Only β‚Ή69/day on days you use itβ€”perfect for students and occasional users

πŸ€– 39+ AI Models: Access Claude, GPT-4, Gemini, DeepSeek, Qwen, Mistral, and more from one platform

πŸ“š Study Mode: Page-by-page PDF learning with custom quizzes and instant note generation

🧠 Memory Control: Selective context management to prevent topic confusion

πŸ’¬ 5M Tokens Daily: Generous daily limits across all premium and open-source models

πŸ”§ Zero Setup: No infrastructure, no GPU costs, no technical complexity

Why We Built This Model

We created LumiChats 4B v1.4 as part of our commitment to open-source AI. While our cloud platform offers 39+ models with advanced features, we believe in giving developers and researchers:

  • β€”Free Alternative: Download and run locally at zero cost
  • β€”Full Control: Self-host on your own hardware
  • β€”Learning Resource: Study our fine-tuning approach
  • β€”Research Foundation: Build on our work for your own projects

Commercial Use

LumiChats 4B v1.4 is released under the Gemma License, which permits commercial use. If you use this model in production:

  • β€”βœ… Commercial applications allowed
  • β€”βœ… Modification and redistribution permitted
  • β€”βœ… Attribution appreciated but not required
  • β€”βš οΈ Review the full Gemma License for details

Connect With Us

Try LumiChats Cloud

Ready for the full experience? Our cloud platform offers:

  • β€”Instant access to 39+ AI models
  • β€”Study Mode with page-by-page PDF learning
  • β€”Memory control across subjects
  • β€”Image analysis and quiz generation
  • β€”No setup, no infrastructure management

Start Free: lumichats.com β€’ No credit card required β€’ β‚Ή69/day only when active


License

This model is licensed under the Gemma License by Google DeepMind.

  • β€”Base Model License: Gemma Terms of Use
  • β€”Fine-tuning & LoRA Adapters: Same Gemma License applies
  • β€”Commercial Use: βœ… Permitted
  • β€”Redistribution: βœ… Allowed with attribution

By using this model, you agree to comply with the Gemma License terms.


Citation

If you use LumiChats 4B v1.4 in your research or applications, please cite:

This Model

bibtex
@misc{lumichats4b2025,
  title={LumiChats 4B v1.4: Fine-tuned Gemma-3 for Conversational AI},
  author={LumiChats Team},
  year={2025},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/adityakum667388/lumichats_4Bz_v1.4}}
}

Base Model (Gemma-3)

bibtex
@article{gemma_2025,
  title={Gemma 3},
  url={https://goo.gle/Gemma3Report},
  publisher={Kaggle},
  author={Gemma Team},
  year={2025}
}

Acknowledgements

This project builds on the exceptional work of multiple teams and open-source communities:

Core Technologies

Special Thanks

  • β€”Tim Dettmers: For bitsandbytes (4-bit quantization)
  • β€”Edward Hu et al.: For the LoRA paper and implementation
  • β€”The Open-Source Community: For continuous improvements and support

Infrastructure

Training was conducted on Google Colab's free tier with NVIDIA Tesla T4 GPUs, demonstrating that high-quality fine-tuning is accessible to everyone.


Future Roadmap

  • β€”[ ] Quantized GGUF versions (Q4KM, Q8_0)
  • β€”[ ] Extended context fine-tuning (up to 128K)
  • β€”[ ] Multi-modal capabilities exploration
  • β€”[ ] Domain-specific fine-tunes (code, creative writing)

Contributing

We welcome contributions! If you've:

  • β€”Improved the model with additional fine-tuning
  • β€”Created useful tools or integrations
  • β€”Found bugs or limitations
  • β€”Developed creative use cases

Please share your work with the community through discussions or pull requests.


<div align="center">

Made with ❀️ by the LumiChats Team

Democratizing AI, one model at a time

πŸš€ Try LumiChats Cloud β€’ πŸ“– Docs β€’ πŸ’¬ Community

</div>