Instructions to use Khalidahmad01/cortex-copilot-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Khalidahmad01/cortex-copilot-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-3b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Khalidahmad01/cortex-copilot-lora") - Transformers
How to use Khalidahmad01/cortex-copilot-lora with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Khalidahmad01/cortex-copilot-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use Khalidahmad01/cortex-copilot-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Khalidahmad01/cortex-copilot-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Khalidahmad01/cortex-copilot-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Khalidahmad01/cortex-copilot-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Khalidahmad01/cortex-copilot-lora", max_seq_length=2048, )
Cortex Copilot LoRA Adapter
Overview
This repository contains the LoRA adapter developed for the Cortex Copilot Engineering Challenge.
The adapter fine-tunes Qwen2.5-3B-Instruct using QLoRA to improve responses for industrial energy management, electrical engineering concepts, Indian electricity tariff logic, and Cortex-specific metrics.
Base Model
Qwen/Qwen2.5-3B-Instruct
Fine-Tuning Method
- Framework: Unsloth
- Method: QLoRA
- PEFT (Parameter-Efficient Fine-Tuning)
Dataset
The model was fine-tuned on 399 instruction-response pairs covering:
- Electrical Engineering Concepts
- Indian Industrial Tariff Rules
- Cortex Metric Explanations
- Energy Optimization
- Refusal Behaviour
- Tenant Isolation
- Prompt Injection Resistance
Training Configuration
| Parameter | Value |
|---|---|
| Epochs | 3 |
| Batch Size | 2 |
| Gradient Accumulation | 4 |
| Learning Rate | 2e-4 |
| Max Sequence Length | 2048 |
| GPU | Tesla T4 |
Files
- adapter_model.safetensors
- adapter_config.json
- tokenizer.json
- tokenizer_config.json
- chat_template.jinja
Intended Use
This adapter is intended for educational purposes as part of the Cortex Copilot Engineering Challenge.
It specializes the base model for industrial energy management while relying on external telemetry data for real-time information.
Author
Khalid Ahmad Raza
B.Tech Computer Engineering
National Institute of Technology Kurukshetra
- Downloads last month
- 19