Text Generation
Transformers
Safetensors
llama
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use mlfoundations-dev/llama3-1_8b_physics_375000_samples with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlfoundations-dev/llama3-1_8b_physics_375000_samples with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlfoundations-dev/llama3-1_8b_physics_375000_samples") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlfoundations-dev/llama3-1_8b_physics_375000_samples") model = AutoModelForCausalLM.from_pretrained("mlfoundations-dev/llama3-1_8b_physics_375000_samples") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mlfoundations-dev/llama3-1_8b_physics_375000_samples with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlfoundations-dev/llama3-1_8b_physics_375000_samples" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlfoundations-dev/llama3-1_8b_physics_375000_samples", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlfoundations-dev/llama3-1_8b_physics_375000_samples
- SGLang
How to use mlfoundations-dev/llama3-1_8b_physics_375000_samples 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 "mlfoundations-dev/llama3-1_8b_physics_375000_samples" \ --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": "mlfoundations-dev/llama3-1_8b_physics_375000_samples", "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 "mlfoundations-dev/llama3-1_8b_physics_375000_samples" \ --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": "mlfoundations-dev/llama3-1_8b_physics_375000_samples", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mlfoundations-dev/llama3-1_8b_physics_375000_samples with Docker Model Runner:
docker model run hf.co/mlfoundations-dev/llama3-1_8b_physics_375000_samples
Training in progress, epoch 3
Browse files
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4976698672
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bde964023bc2d0c2ef9a56dcb662274beac2f80237b7f7c7848c18c8178223fe
|
| 3 |
size 4976698672
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999802720
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d72d097dcd13abeaaa534a08fa18e0be7a8a7b811a3e3a52dab8899702a25ee
|
| 3 |
size 4999802720
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4915916176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:042aa73788afe49f9f04c030812ef6332a35d688d9b51d7898768a3b70339d50
|
| 3 |
size 4915916176
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1168138808
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e698240d6fba6470902b3882a63a87a27adca60c65166c40a4c2ced364778cdd
|
| 3 |
size 1168138808
|
trainer_log.jsonl
CHANGED
|
@@ -62,3 +62,26 @@
|
|
| 62 |
{"current_steps": 600, "total_steps": 834, "loss": 0.7163, "lr": 5e-06, "epoch": 2.158273381294964, "percentage": 71.94, "elapsed_time": "1:05:22", "remaining_time": "0:25:29"}
|
| 63 |
{"current_steps": 610, "total_steps": 834, "loss": 0.7197, "lr": 5e-06, "epoch": 2.194244604316547, "percentage": 73.14, "elapsed_time": "1:06:25", "remaining_time": "0:24:23"}
|
| 64 |
{"current_steps": 620, "total_steps": 834, "loss": 0.7192, "lr": 5e-06, "epoch": 2.2302158273381294, "percentage": 74.34, "elapsed_time": "1:07:27", "remaining_time": "0:23:17"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
{"current_steps": 600, "total_steps": 834, "loss": 0.7163, "lr": 5e-06, "epoch": 2.158273381294964, "percentage": 71.94, "elapsed_time": "1:05:22", "remaining_time": "0:25:29"}
|
| 63 |
{"current_steps": 610, "total_steps": 834, "loss": 0.7197, "lr": 5e-06, "epoch": 2.194244604316547, "percentage": 73.14, "elapsed_time": "1:06:25", "remaining_time": "0:24:23"}
|
| 64 |
{"current_steps": 620, "total_steps": 834, "loss": 0.7192, "lr": 5e-06, "epoch": 2.2302158273381294, "percentage": 74.34, "elapsed_time": "1:07:27", "remaining_time": "0:23:17"}
|
| 65 |
+
{"current_steps": 630, "total_steps": 834, "loss": 0.717, "lr": 5e-06, "epoch": 2.2661870503597124, "percentage": 75.54, "elapsed_time": "1:08:29", "remaining_time": "0:22:10"}
|
| 66 |
+
{"current_steps": 640, "total_steps": 834, "loss": 0.7171, "lr": 5e-06, "epoch": 2.302158273381295, "percentage": 76.74, "elapsed_time": "1:09:31", "remaining_time": "0:21:04"}
|
| 67 |
+
{"current_steps": 650, "total_steps": 834, "loss": 0.7179, "lr": 5e-06, "epoch": 2.338129496402878, "percentage": 77.94, "elapsed_time": "1:10:32", "remaining_time": "0:19:58"}
|
| 68 |
+
{"current_steps": 660, "total_steps": 834, "loss": 0.7208, "lr": 5e-06, "epoch": 2.3741007194244603, "percentage": 79.14, "elapsed_time": "1:11:34", "remaining_time": "0:18:52"}
|
| 69 |
+
{"current_steps": 670, "total_steps": 834, "loss": 0.7201, "lr": 5e-06, "epoch": 2.4100719424460433, "percentage": 80.34, "elapsed_time": "1:12:36", "remaining_time": "0:17:46"}
|
| 70 |
+
{"current_steps": 680, "total_steps": 834, "loss": 0.7165, "lr": 5e-06, "epoch": 2.446043165467626, "percentage": 81.53, "elapsed_time": "1:13:38", "remaining_time": "0:16:40"}
|
| 71 |
+
{"current_steps": 690, "total_steps": 834, "loss": 0.7199, "lr": 5e-06, "epoch": 2.4820143884892087, "percentage": 82.73, "elapsed_time": "1:14:39", "remaining_time": "0:15:34"}
|
| 72 |
+
{"current_steps": 700, "total_steps": 834, "loss": 0.7228, "lr": 5e-06, "epoch": 2.5179856115107913, "percentage": 83.93, "elapsed_time": "1:15:41", "remaining_time": "0:14:29"}
|
| 73 |
+
{"current_steps": 710, "total_steps": 834, "loss": 0.7211, "lr": 5e-06, "epoch": 2.553956834532374, "percentage": 85.13, "elapsed_time": "1:16:42", "remaining_time": "0:13:23"}
|
| 74 |
+
{"current_steps": 720, "total_steps": 834, "loss": 0.7192, "lr": 5e-06, "epoch": 2.5899280575539567, "percentage": 86.33, "elapsed_time": "1:17:44", "remaining_time": "0:12:18"}
|
| 75 |
+
{"current_steps": 730, "total_steps": 834, "loss": 0.7208, "lr": 5e-06, "epoch": 2.6258992805755397, "percentage": 87.53, "elapsed_time": "1:18:45", "remaining_time": "0:11:13"}
|
| 76 |
+
{"current_steps": 740, "total_steps": 834, "loss": 0.7184, "lr": 5e-06, "epoch": 2.661870503597122, "percentage": 88.73, "elapsed_time": "1:19:46", "remaining_time": "0:10:08"}
|
| 77 |
+
{"current_steps": 750, "total_steps": 834, "loss": 0.7139, "lr": 5e-06, "epoch": 2.697841726618705, "percentage": 89.93, "elapsed_time": "1:20:48", "remaining_time": "0:09:03"}
|
| 78 |
+
{"current_steps": 760, "total_steps": 834, "loss": 0.7207, "lr": 5e-06, "epoch": 2.7338129496402876, "percentage": 91.13, "elapsed_time": "1:21:49", "remaining_time": "0:07:58"}
|
| 79 |
+
{"current_steps": 770, "total_steps": 834, "loss": 0.7193, "lr": 5e-06, "epoch": 2.7697841726618706, "percentage": 92.33, "elapsed_time": "1:22:51", "remaining_time": "0:06:53"}
|
| 80 |
+
{"current_steps": 780, "total_steps": 834, "loss": 0.7185, "lr": 5e-06, "epoch": 2.805755395683453, "percentage": 93.53, "elapsed_time": "1:23:53", "remaining_time": "0:05:48"}
|
| 81 |
+
{"current_steps": 790, "total_steps": 834, "loss": 0.7217, "lr": 5e-06, "epoch": 2.841726618705036, "percentage": 94.72, "elapsed_time": "1:24:54", "remaining_time": "0:04:43"}
|
| 82 |
+
{"current_steps": 800, "total_steps": 834, "loss": 0.7213, "lr": 5e-06, "epoch": 2.8776978417266186, "percentage": 95.92, "elapsed_time": "1:25:55", "remaining_time": "0:03:39"}
|
| 83 |
+
{"current_steps": 810, "total_steps": 834, "loss": 0.7183, "lr": 5e-06, "epoch": 2.9136690647482015, "percentage": 97.12, "elapsed_time": "1:26:57", "remaining_time": "0:02:34"}
|
| 84 |
+
{"current_steps": 820, "total_steps": 834, "loss": 0.7216, "lr": 5e-06, "epoch": 2.949640287769784, "percentage": 98.32, "elapsed_time": "1:27:58", "remaining_time": "0:01:30"}
|
| 85 |
+
{"current_steps": 830, "total_steps": 834, "loss": 0.7198, "lr": 5e-06, "epoch": 2.985611510791367, "percentage": 99.52, "elapsed_time": "1:29:01", "remaining_time": "0:00:25"}
|
| 86 |
+
{"current_steps": 834, "total_steps": 834, "eval_loss": 0.7752296328544617, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "1:31:23", "remaining_time": "0:00:00"}
|
| 87 |
+
{"current_steps": 834, "total_steps": 834, "epoch": 3.0, "percentage": 100.0, "elapsed_time": "1:32:50", "remaining_time": "0:00:00"}
|