Instructions to use ueihieu/llama2-7b-lora-rebel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ueihieu/llama2-7b-lora-rebel with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("NousResearch/Llama-2-7b-hf") model = PeftModel.from_pretrained(base_model, "ueihieu/llama2-7b-lora-rebel") - Transformers
How to use ueihieu/llama2-7b-lora-rebel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ueihieu/llama2-7b-lora-rebel")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ueihieu/llama2-7b-lora-rebel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ueihieu/llama2-7b-lora-rebel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ueihieu/llama2-7b-lora-rebel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ueihieu/llama2-7b-lora-rebel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ueihieu/llama2-7b-lora-rebel
- SGLang
How to use ueihieu/llama2-7b-lora-rebel 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 "ueihieu/llama2-7b-lora-rebel" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ueihieu/llama2-7b-lora-rebel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ueihieu/llama2-7b-lora-rebel" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ueihieu/llama2-7b-lora-rebel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ueihieu/llama2-7b-lora-rebel with Docker Model Runner:
docker model run hf.co/ueihieu/llama2-7b-lora-rebel
llama2-7b-lora-rebel
This model is a fine-tuned version of NousResearch/Llama-2-7b-hf on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 2.8091
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.0003
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 100
- training_steps: 500
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 9.5316 | 0.0006 | 20 | 9.1564 |
| 5.5820 | 0.0012 | 40 | 5.0022 |
| 3.1964 | 0.0018 | 60 | 3.2908 |
| 3.0524 | 0.0024 | 80 | 2.9273 |
| 2.9086 | 0.0030 | 100 | 2.8656 |
| 2.9885 | 0.0036 | 120 | 2.8475 |
| 3.0935 | 0.0042 | 140 | 2.8373 |
| 2.9271 | 0.0048 | 160 | 2.8356 |
| 2.8657 | 0.0054 | 180 | 2.8280 |
| 2.7070 | 0.0060 | 200 | 2.8244 |
| 2.9717 | 0.0066 | 220 | 2.8218 |
| 2.8754 | 0.0072 | 240 | 2.8200 |
| 2.8520 | 0.0078 | 260 | 2.8178 |
| 2.4384 | 0.0084 | 280 | 2.8158 |
| 2.9701 | 0.0090 | 300 | 2.8149 |
| 2.8678 | 0.0096 | 320 | 2.8139 |
| 2.7211 | 0.0102 | 340 | 2.8127 |
| 2.7630 | 0.0108 | 360 | 2.8123 |
| 2.8834 | 0.0114 | 380 | 2.8115 |
| 2.8540 | 0.0120 | 400 | 2.8110 |
| 2.9288 | 0.0126 | 420 | 2.8114 |
| 2.7809 | 0.0132 | 440 | 2.8099 |
| 2.8883 | 0.0138 | 460 | 2.8094 |
| 2.7767 | 0.0144 | 480 | 2.8092 |
| 2.6354 | 0.0150 | 500 | 2.8091 |
Framework versions
- PEFT 0.18.1
- Transformers 5.2.0
- Pytorch 2.9.0+cu126
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 2
Model tree for ueihieu/llama2-7b-lora-rebel
Base model
NousResearch/Llama-2-7b-hf