Downloads · 30 days
6
20% of all-time downloads
danifeed/qwen-cringe-lora
qwen-cringe-lora is a machine learning model from danifeed. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
license: licence tags: - peft - lora - qwen - text-generation - ru ---
Downloads · 30 days
6
20% of all-time downloads
All-time downloads
30
Public
Repo size
501 MB
Likes
0
Public
Click a slice to open those files.
.safetensors323 MB · 52%
From the Hugging Face model README
license: licence tags:
Адаптер для генерации текста в стиле "кринжового зумера". Дообучен на базе Qwen2-7B-Instruct.
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
MODEL_ID = "Qwen/Qwen2-7B-Instruct"
ADAPTER_PATH = "danifeed/qwen-cringe-lora"
bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, quantization_config=bnb_config, device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER_PATH)
prompt = "как дела?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(out[0], skip_special_tokens=True))
This model was trained with SFT.
### Framework versions
- PEFT 0.18.1
- TRL: 0.29.0
- Transformers: 5.2.0
- Pytorch: 2.10.0
- Datasets: 4.6.0
- Tokenizers: 0.22.2
## Citations
Cite TRL as:
```bibtex
@software{vonwerra2020trl,
title = {{TRL: Transformers Reinforcement Learning}},
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
license = {Apache-2.0},
url = {https://github.com/huggingface/trl},
year = {2020}
}