Instructions to use ueihieu/llama2-7b-lora-scierc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ueihieu/llama2-7b-lora-scierc 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-scierc") - Transformers
How to use ueihieu/llama2-7b-lora-scierc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ueihieu/llama2-7b-lora-scierc")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ueihieu/llama2-7b-lora-scierc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ueihieu/llama2-7b-lora-scierc 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-scierc" # 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-scierc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ueihieu/llama2-7b-lora-scierc
- SGLang
How to use ueihieu/llama2-7b-lora-scierc 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-scierc" \ --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-scierc", "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-scierc" \ --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-scierc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ueihieu/llama2-7b-lora-scierc with Docker Model Runner:
docker model run hf.co/ueihieu/llama2-7b-lora-scierc
llama2-7b-lora-scierc
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: 1.6978
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 |
|---|---|---|---|
| 5.6120 | 0.0361 | 20 | 5.1342 |
| 2.9998 | 0.0722 | 40 | 3.1167 |
| 2.7886 | 0.1083 | 60 | 2.6022 |
| 2.3549 | 0.1444 | 80 | 2.3743 |
| 2.0507 | 0.1805 | 100 | 2.3204 |
| 2.2334 | 0.2166 | 120 | 2.2844 |
| 2.0928 | 0.2527 | 140 | 2.2521 |
| 2.3828 | 0.2888 | 160 | 2.2191 |
| 2.2091 | 0.3249 | 180 | 2.1864 |
| 2.1972 | 0.3610 | 200 | 2.1520 |
| 2.0895 | 0.3971 | 220 | 2.1100 |
| 2.2188 | 0.4332 | 240 | 2.0672 |
| 2.0837 | 0.4693 | 260 | 2.0319 |
| 2.0093 | 0.5054 | 280 | 1.9877 |
| 1.9424 | 0.5415 | 300 | 1.9441 |
| 2.0697 | 0.5776 | 320 | 1.9027 |
| 1.9542 | 0.6137 | 340 | 1.8772 |
| 1.6690 | 0.6498 | 360 | 1.8424 |
| 1.8379 | 0.6859 | 380 | 1.8040 |
| 1.9799 | 0.7220 | 400 | 1.7791 |
| 1.8926 | 0.7581 | 420 | 1.7500 |
| 1.7145 | 0.7942 | 440 | 1.7267 |
| 1.8679 | 0.8303 | 460 | 1.7114 |
| 1.9494 | 0.8664 | 480 | 1.7028 |
| 1.7245 | 0.9025 | 500 | 1.6978 |
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
- 1
Model tree for ueihieu/llama2-7b-lora-scierc
Base model
NousResearch/Llama-2-7b-hf