Text Generation
Transformers
TensorBoard
Safetensors
llama
alignment-handbook
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use CharlesLi/llama_2_cot_simplest_code_math_1_full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CharlesLi/llama_2_cot_simplest_code_math_1_full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CharlesLi/llama_2_cot_simplest_code_math_1_full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CharlesLi/llama_2_cot_simplest_code_math_1_full") model = AutoModelForCausalLM.from_pretrained("CharlesLi/llama_2_cot_simplest_code_math_1_full") 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
- vLLM
How to use CharlesLi/llama_2_cot_simplest_code_math_1_full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CharlesLi/llama_2_cot_simplest_code_math_1_full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CharlesLi/llama_2_cot_simplest_code_math_1_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CharlesLi/llama_2_cot_simplest_code_math_1_full
- SGLang
How to use CharlesLi/llama_2_cot_simplest_code_math_1_full 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 "CharlesLi/llama_2_cot_simplest_code_math_1_full" \ --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": "CharlesLi/llama_2_cot_simplest_code_math_1_full", "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 "CharlesLi/llama_2_cot_simplest_code_math_1_full" \ --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": "CharlesLi/llama_2_cot_simplest_code_math_1_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CharlesLi/llama_2_cot_simplest_code_math_1_full with Docker Model Runner:
docker model run hf.co/CharlesLi/llama_2_cot_simplest_code_math_1_full
Model save
Browse files- README.md +1 -6
- all_results.json +3 -3
- config.json +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
- runs/Jan20_12-37-18_dgx-a100-16/events.out.tfevents.1737373062.dgx-a100-16.3013885.0 +3 -0
- train_results.json +3 -3
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -3,12 +3,9 @@ library_name: transformers
|
|
| 3 |
license: llama2
|
| 4 |
base_model: meta-llama/Llama-2-7b-chat-hf
|
| 5 |
tags:
|
| 6 |
-
- alignment-handbook
|
| 7 |
-
- trl
|
| 8 |
-
- sft
|
| 9 |
-
- generated_from_trainer
|
| 10 |
- trl
|
| 11 |
- sft
|
|
|
|
| 12 |
- generated_from_trainer
|
| 13 |
datasets:
|
| 14 |
- generator
|
|
@@ -23,8 +20,6 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 23 |
# llama_2_cot_simplest_code_math_1_full
|
| 24 |
|
| 25 |
This model is a fine-tuned version of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) on the generator dataset.
|
| 26 |
-
It achieves the following results on the evaluation set:
|
| 27 |
-
- Loss: 0.7908
|
| 28 |
|
| 29 |
## Model description
|
| 30 |
|
|
|
|
| 3 |
license: llama2
|
| 4 |
base_model: meta-llama/Llama-2-7b-chat-hf
|
| 5 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
- trl
|
| 7 |
- sft
|
| 8 |
+
- alignment-handbook
|
| 9 |
- generated_from_trainer
|
| 10 |
datasets:
|
| 11 |
- generator
|
|
|
|
| 20 |
# llama_2_cot_simplest_code_math_1_full
|
| 21 |
|
| 22 |
This model is a fine-tuned version of [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf) on the generator dataset.
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Model description
|
| 25 |
|
all_results.json
CHANGED
|
@@ -6,9 +6,9 @@
|
|
| 6 |
"eval_samples_per_second": 5.888,
|
| 7 |
"eval_steps_per_second": 1.472,
|
| 8 |
"total_flos": 575794053120.0,
|
| 9 |
-
"train_loss": 1.
|
| 10 |
-
"train_runtime": 34.
|
| 11 |
"train_samples": 980,
|
| 12 |
-
"train_samples_per_second": 5.
|
| 13 |
"train_steps_per_second": 0.175
|
| 14 |
}
|
|
|
|
| 6 |
"eval_samples_per_second": 5.888,
|
| 7 |
"eval_steps_per_second": 1.472,
|
| 8 |
"total_flos": 575794053120.0,
|
| 9 |
+
"train_loss": 1.0462158918380737,
|
| 10 |
+
"train_runtime": 34.3419,
|
| 11 |
"train_samples": 980,
|
| 12 |
+
"train_samples_per_second": 5.736,
|
| 13 |
"train_steps_per_second": 0.175
|
| 14 |
}
|
config.json
CHANGED
|
@@ -24,6 +24,6 @@
|
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.44.2",
|
| 27 |
-
"use_cache":
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
|
|
|
| 24 |
"tie_word_embeddings": false,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.44.2",
|
| 27 |
+
"use_cache": false,
|
| 28 |
"vocab_size": 32000
|
| 29 |
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4938985352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c35685eee5947eed673c075e2ef57727702caa3d9aab90113cbb64f190bcc434
|
| 3 |
size 4938985352
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4947390880
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6702647537cb7ca89fbcb10f504afb3854348c186f5ccf4d15447abf7b4866e8
|
| 3 |
size 4947390880
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3590488816
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3502ae6682046b68e1801479907fe1aa5a540bff349174a62f23090c25b8135
|
| 3 |
size 3590488816
|
runs/Jan20_12-37-18_dgx-a100-16/events.out.tfevents.1737373062.dgx-a100-16.3013885.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16c88e292b6baadb32b77411bbd9ea79a54452d93e7416429059d51b6dc3f224
|
| 3 |
+
size 6252
|
train_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9230769230769231,
|
| 3 |
"total_flos": 575794053120.0,
|
| 4 |
-
"train_loss": 1.
|
| 5 |
-
"train_runtime": 34.
|
| 6 |
"train_samples": 980,
|
| 7 |
-
"train_samples_per_second": 5.
|
| 8 |
"train_steps_per_second": 0.175
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9230769230769231,
|
| 3 |
"total_flos": 575794053120.0,
|
| 4 |
+
"train_loss": 1.0462158918380737,
|
| 5 |
+
"train_runtime": 34.3419,
|
| 6 |
"train_samples": 980,
|
| 7 |
+
"train_samples_per_second": 5.736,
|
| 8 |
"train_steps_per_second": 0.175
|
| 9 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7032
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d062afaa97a20845bc9cc6a378320e678a09443360f846cebfdd19e46464026a
|
| 3 |
size 7032
|