Instructions to use CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.6-27B") model = PeftModel.from_pretrained(base_model, "CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 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 CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 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 CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1", max_seq_length=2048, )
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
library_name:
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
base_model: Qwen/Qwen3.6-27B
|
| 6 |
tags:
|
| 7 |
- unsloth
|
| 8 |
- lora
|
|
|
|
| 9 |
- finetune
|
| 10 |
- cybersecurity
|
| 11 |
- security
|
|
@@ -13,15 +14,48 @@ tags:
|
|
| 13 |
|
| 14 |
# Changeway-Qwen3.6-27B-V1
|
| 15 |
|
| 16 |
-
This
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## 🛡️ Domain Focus: Cybersecurity
|
| 19 |
-
This
|
| 20 |
* Threat intelligence analysis
|
| 21 |
* Log analysis and incident response
|
| 22 |
* General cybersecurity knowledge retrieval
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
## 🚀 Training Details
|
|
|
|
| 25 |
* **Base Model:** [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B)
|
| 26 |
* **Training Framework:** [Unsloth](https://github.com/unslothai/unsloth)
|
| 27 |
-
* **Method:** LoRA
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
library_name: peft
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
base_model: Qwen/Qwen3.6-27B
|
| 6 |
tags:
|
| 7 |
- unsloth
|
| 8 |
- lora
|
| 9 |
+
- peft
|
| 10 |
- finetune
|
| 11 |
- cybersecurity
|
| 12 |
- security
|
|
|
|
| 14 |
|
| 15 |
# Changeway-Qwen3.6-27B-V1
|
| 16 |
|
| 17 |
+
⚠️ **Note: This repository contains the LoRA adapter weights only.** It is not a standalone model. You must load it alongside the base model [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B).
|
| 18 |
+
|
| 19 |
+
This LoRA adapter is fine-tuned to enhance the model's capabilities specifically in the **Cybersecurity** domain. It was efficiently trained using [Unsloth](https://github.com/unslothai/unsloth).
|
| 20 |
|
| 21 |
## 🛡️ Domain Focus: Cybersecurity
|
| 22 |
+
This fine-tuned adapter improves the base model's performance in:
|
| 23 |
* Threat intelligence analysis
|
| 24 |
* Log analysis and incident response
|
| 25 |
* General cybersecurity knowledge retrieval
|
| 26 |
|
| 27 |
+
## 💻 How to Merge and Save (Unsloth)
|
| 28 |
+
|
| 29 |
+
You can easily download this LoRA adapter, merge it with the base model, and save it as a complete 16-bit model using Unsloth.
|
| 30 |
+
|
| 31 |
+
Make sure you have Unsloth installed, then run the following Python script:
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from unsloth import FastLanguageModel
|
| 35 |
+
|
| 36 |
+
# 1. Point model_name directly to this Hugging Face repository!
|
| 37 |
+
# Unsloth will automatically read the config and load the base model together with the LoRA.
|
| 38 |
+
LORA_DIR = "CTCT-CT2/Changeway-Qwen3.6-27B-LoRA-V1"
|
| 39 |
+
|
| 40 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 41 |
+
model_name = LORA_DIR,
|
| 42 |
+
max_seq_length = 8192,
|
| 43 |
+
dtype = None,
|
| 44 |
+
load_in_4bit = False, # Note: It is best to disable 4bit when merging, load in 16bit mode
|
| 45 |
+
device_map = "auto", # [!] Let it automatically take over or force allocation
|
| 46 |
+
)
|
| 47 |
+
|
| 48 |
+
# 2. Merge the LoRA into the Base model and save as a new full model
|
| 49 |
+
MERGED_DIR = "./qwen-27b-cybersec-merged"
|
| 50 |
+
print(f"Merging and saving to {MERGED_DIR} ...")
|
| 51 |
+
|
| 52 |
+
model.save_pretrained_merged(MERGED_DIR, tokenizer, save_method="merged_16bit")
|
| 53 |
+
print("Merge completed successfully!")
|
| 54 |
+
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
## 🚀 Training Details
|
| 58 |
+
|
| 59 |
* **Base Model:** [Qwen/Qwen3.6-27B](https://huggingface.co/Qwen/Qwen3.6-27B)
|
| 60 |
* **Training Framework:** [Unsloth](https://github.com/unslothai/unsloth)
|
| 61 |
+
* **Method:** LoRA (Low-Rank Adaptation)
|