Text Generation
Transformers
TensorBoard
Safetensors
llama
alignment-handbook
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use pkarypis/llama2-lima with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pkarypis/llama2-lima with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pkarypis/llama2-lima") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pkarypis/llama2-lima") model = AutoModelForCausalLM.from_pretrained("pkarypis/llama2-lima") 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 pkarypis/llama2-lima with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pkarypis/llama2-lima" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pkarypis/llama2-lima", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pkarypis/llama2-lima
- SGLang
How to use pkarypis/llama2-lima 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 "pkarypis/llama2-lima" \ --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": "pkarypis/llama2-lima", "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 "pkarypis/llama2-lima" \ --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": "pkarypis/llama2-lima", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pkarypis/llama2-lima with Docker Model Runner:
docker model run hf.co/pkarypis/llama2-lima
End of training
Browse files- README.md +6 -2
- all_results.json +5 -0
- config.json +1 -1
- eval_results.json +8 -0
- runs/Apr26_14-38-49_aga39/events.out.tfevents.1714161024.aga39.1452190.1 +3 -0
README.md
CHANGED
|
@@ -2,11 +2,15 @@
|
|
| 2 |
license: llama2
|
| 3 |
base_model: meta-llama/Llama-2-7b-hf
|
| 4 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
- trl
|
| 6 |
- sft
|
| 7 |
- generated_from_trainer
|
| 8 |
datasets:
|
| 9 |
-
-
|
| 10 |
model-index:
|
| 11 |
- name: llama2-lima
|
| 12 |
results: []
|
|
@@ -17,7 +21,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
# llama2-lima
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf) on the
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
- Loss: 2.5297
|
| 23 |
|
|
|
|
| 2 |
license: llama2
|
| 3 |
base_model: meta-llama/Llama-2-7b-hf
|
| 4 |
tags:
|
| 5 |
+
- alignment-handbook
|
| 6 |
+
- trl
|
| 7 |
+
- sft
|
| 8 |
+
- generated_from_trainer
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
- generated_from_trainer
|
| 12 |
datasets:
|
| 13 |
+
- GAIR/lima
|
| 14 |
model-index:
|
| 15 |
- name: llama2-lima
|
| 16 |
results: []
|
|
|
|
| 21 |
|
| 22 |
# llama2-lima
|
| 23 |
|
| 24 |
+
This model is a fine-tuned version of [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf) on the GAIR/lima dataset.
|
| 25 |
It achieves the following results on the evaluation set:
|
| 26 |
- Loss: 2.5297
|
| 27 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 10.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"train_loss": 1.0364325324694315,
|
| 4 |
"train_runtime": 358.0118,
|
| 5 |
"train_samples": 1030,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 10.0,
|
| 3 |
+
"eval_loss": 2.5297091007232666,
|
| 4 |
+
"eval_runtime": 2.0612,
|
| 5 |
+
"eval_samples": 300,
|
| 6 |
+
"eval_samples_per_second": 5.822,
|
| 7 |
+
"eval_steps_per_second": 0.485,
|
| 8 |
"train_loss": 1.0364325324694315,
|
| 9 |
"train_runtime": 358.0118,
|
| 10 |
"train_samples": 1030,
|
config.json
CHANGED
|
@@ -23,6 +23,6 @@
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.38.2",
|
| 26 |
-
"use_cache":
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
|
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.38.2",
|
| 26 |
+
"use_cache": true,
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 10.0,
|
| 3 |
+
"eval_loss": 2.5297091007232666,
|
| 4 |
+
"eval_runtime": 2.0612,
|
| 5 |
+
"eval_samples": 300,
|
| 6 |
+
"eval_samples_per_second": 5.822,
|
| 7 |
+
"eval_steps_per_second": 0.485
|
| 8 |
+
}
|
runs/Apr26_14-38-49_aga39/events.out.tfevents.1714161024.aga39.1452190.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e03c81f39ac13323386f8483663135a7d9c911388c47193b5c91590d5c67c805
|
| 3 |
+
size 354
|