humanize-e-adapter / MODEL_CARD.md
world44's picture
Update repo id
2255615 verified
|
Raw History Blame Contribute Delete
1.28 kB

humanize-e Adapter

A QLoRA LoRA adapter for Qwen2.5-3B-Instruct trained to humanize AI-generated text.

Model Details

Usage

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:

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