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, )
File size: 1,668 Bytes
d6245c3 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c d6245c3 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c 06d9920 8e2dc2c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | ---
license: apache-2.0
base_model: Qwen/Qwen2.5-3B-Instruct
library_name: peft
tags:
- lora
- qlora
- unsloth
- transformers
- industrial-ai
- cortex
---
# 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 |