Spaces:
Configuration error
Configuration error
File size: 1,280 Bytes
6595ce6 | 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 | # humanize-e Adapter
A QLoRA LoRA adapter for Qwen2.5-3B-Instruct trained to humanize AI-generated text.
## Model Details
- **Base Model:** Qwen/Qwen2.5-3B-Instruct
- **Fine-tuning Method:** QLoRA (LoRA r=32, alpha=64)
- **Training Data:** 156 synthetic pairs from Kaggle AI vs Human Text dataset
- **Developer:** Mike Elistra (Mike Koci)
- **Training Notebook:** https://www.kaggle.com/code/mick009/notebook9c4e543da9
## Usage
```python
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch
base_model = "Qwen/Qwen2.5-3B-Instruct"
adapter_path = "mike-elistra/humanize-e-adapter"
tokenizer = AutoTokenizer.from_pretrained(adapter_path)
model = AutoModelForCausalLM.from_pretrained(
base_model,
quantization_config=BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4"),
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_path)
model.eval()
# Use with humanize-e inference code
```
## Inference API
The adapter works with the humanize-e FastAPI service:
```bash
HUMANIZE_ADAPTER=mike-elistra/humanize-e-adapter python app.py
```
## Training
See Kaggle notebook for full training pipeline:
https://www.kaggle.com/code/mick009/notebook9c4e543da9
## License
MIT
|