Text Generation
PEFT
Safetensors
Transformers
qwen2
axolotl
lora
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use htarikk/qwen80b-style-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use htarikk/qwen80b-style-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-72B-Instruct") model = PeftModel.from_pretrained(base_model, "htarikk/qwen80b-style-lora") - Transformers
How to use htarikk/qwen80b-style-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="htarikk/qwen80b-style-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("htarikk/qwen80b-style-lora") model = AutoModelForCausalLM.from_pretrained("htarikk/qwen80b-style-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use htarikk/qwen80b-style-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "htarikk/qwen80b-style-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": "htarikk/qwen80b-style-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/htarikk/qwen80b-style-lora
- SGLang
How to use htarikk/qwen80b-style-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 "htarikk/qwen80b-style-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": "htarikk/qwen80b-style-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 "htarikk/qwen80b-style-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": "htarikk/qwen80b-style-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use htarikk/qwen80b-style-lora with Docker Model Runner:
docker model run hf.co/htarikk/qwen80b-style-lora
See axolotl config
axolotl version: 0.13.0.dev0
adapter: lora
base_model: Qwen/Qwen2.5-72B-Instruct
load_in_4bit: true
bnb_4bit_compute_dtype: bfloat16
bnb_4bit_use_double_quant: true
bnb_4bit_quant_type: nf4
datasets:
- path: ./patched_dataset/data.jsonl
type: alpaca
val_set_size: 0.05
output_dir: ./outputs/qwen80b_qlora_run
micro_batch_size: 1
gradient_accumulation_steps: 8
num_epochs: 3
learning_rate: 2e-4
lora_alpha: 16
lora_r: 8
lora_dropout: 0.05
lora_target_modules:
- q_proj
- v_proj
- k_proj
- o_proj
- gate_proj
- down_proj
- up_proj
sequence_len: 1024
train_on_inputs: false
optimizer: paged_adamw_8bit
bf16: true
fp16: false
tf32: true
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
warmup_ratio: 0.03
weight_decay: 0.01
logging_steps: 10
saves_per_epoch: 1
evals_per_epoch: 1
save_total_limit: 2
device_map: "auto"
low_cpu_mem_usage: true
torch_dtype: bfloat16
outputs/qwen80b_qlora_run
This model is a fine-tuned version of Qwen/Qwen2.5-72B-Instruct on the ./patched_dataset/data.jsonl dataset. It achieves the following results on the evaluation set:
- Loss: 1.8941
- Memory/max Active (gib): 43.77
- Memory/max Allocated (gib): 43.77
- Memory/device Reserved (gib): 45.94
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 8
- optimizer: Use OptimizerNames.PAGED_ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 2
- training_steps: 90
Training results
| Training Loss | Epoch | Step | Validation Loss | Active (gib) | Allocated (gib) | Reserved (gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 2.5724 | 43.65 | 43.65 | 52.31 |
| 2.0549 | 1.0 | 30 | 1.8877 | 43.77 | 43.77 | 45.94 |
| 1.6302 | 2.0 | 60 | 1.8321 | 43.77 | 43.77 | 45.94 |
| 1.3038 | 3.0 | 90 | 1.8941 | 43.77 | 43.77 | 45.94 |
Framework versions
- PEFT 0.17.1
- Transformers 4.57.0
- Pytorch 2.7.1+cu126
- Datasets 4.0.0
- Tokenizers 0.22.1
- Downloads last month
- 1