Text Generation
PEFT
Safetensors
Transformers
Chinese
llama-factory
lora
chinese
political-commentary
conversational
Instructions to use lmxxf/little-pink-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use lmxxf/little-pink-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/workspace/models/Qwen2.5-72B-Instruct-AWQ") model = PeftModel.from_pretrained(base_model, "lmxxf/little-pink-lora") - Transformers
How to use lmxxf/little-pink-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lmxxf/little-pink-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lmxxf/little-pink-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmxxf/little-pink-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmxxf/little-pink-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmxxf/little-pink-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lmxxf/little-pink-lora
- SGLang
How to use lmxxf/little-pink-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lmxxf/little-pink-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmxxf/little-pink-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lmxxf/little-pink-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmxxf/little-pink-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lmxxf/little-pink-lora with Docker Model Runner:
docker model run hf.co/lmxxf/little-pink-lora
Little Pink LoRA (小粉红 LoRA)
LoRA adapter for Qwen2.5-72B-Instruct-AWQ, fine-tuned on 1973 Chinese political commentary Q&A pairs to simulate a "小粉红" (Little Pink / Chinese nationalist) persona.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-72B-Instruct-AWQ",
torch_dtype="float16",
device_map="cuda:0"
)
model = PeftModel.from_pretrained(base_model, "lmxxf/little-pink-lora")
tokenizer = AutoTokenizer.from_pretrained("lmxxf/little-pink-lora")
Full project & interactive chat script: github.com/lmxxf/little-pink-ai
Training
| Parameter | Value |
|---|---|
| Base Model | Qwen2.5-72B-Instruct-AWQ |
| Method | LoRA (r=16, alpha=32) |
| Training Data | 1973 Q&A pairs |
| Epochs | 3 |
| Final Loss | 0.2638 |
| Training Time | 18 hours |
| Hardware | NVIDIA DGX Spark (GB10, 128GB) |
| Framework | LLaMA-Factory |
Training Hyperparameters
- learning_rate: 1e-4
- train_batch_size: 1
- gradient_accumulation_steps: 8 (effective batch size = 8)
- lr_scheduler_type: cosine
- warmup_ratio: 0.1
- num_epochs: 3
- mixed_precision: fp16
Framework Versions
- PEFT 0.17.1
- Transformers 4.51.3
- PyTorch 2.10.0a0+b558c986e8.nv25.11
- Downloads last month
- 6
Model tree for lmxxf/little-pink-lora
Base model
Qwen/Qwen2.5-72B Finetuned
Qwen/Qwen2.5-72B-Instruct Quantized
Qwen/Qwen2.5-72B-Instruct-AWQ