Text Generation
Transformers
Safetensors
llama
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use mlfoundations-dev/stackexchange_engineering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlfoundations-dev/stackexchange_engineering with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlfoundations-dev/stackexchange_engineering") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlfoundations-dev/stackexchange_engineering") model = AutoModelForCausalLM.from_pretrained("mlfoundations-dev/stackexchange_engineering") 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/stackexchange_engineering with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlfoundations-dev/stackexchange_engineering" # 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/stackexchange_engineering", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlfoundations-dev/stackexchange_engineering
- SGLang
How to use mlfoundations-dev/stackexchange_engineering 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/stackexchange_engineering" \ --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/stackexchange_engineering", "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/stackexchange_engineering" \ --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/stackexchange_engineering", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mlfoundations-dev/stackexchange_engineering with Docker Model Runner:
docker model run hf.co/mlfoundations-dev/stackexchange_engineering
End of training
Browse files- README.md +2 -1
- all_results.json +12 -0
- eval_results.json +7 -0
- train_results.json +8 -0
- trainer_state.json +115 -0
- training_eval_loss.png +0 -0
- training_loss.png +0 -0
README.md
CHANGED
|
@@ -4,6 +4,7 @@ license: llama3.1
|
|
| 4 |
base_model: meta-llama/Meta-Llama-3.1-8B
|
| 5 |
tags:
|
| 6 |
- llama-factory
|
|
|
|
| 7 |
- generated_from_trainer
|
| 8 |
model-index:
|
| 9 |
- name: stackexchange_engineering
|
|
@@ -15,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
# stackexchange_engineering
|
| 17 |
|
| 18 |
-
This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B) on
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
- Loss: 0.9366
|
| 21 |
|
|
|
|
| 4 |
base_model: meta-llama/Meta-Llama-3.1-8B
|
| 5 |
tags:
|
| 6 |
- llama-factory
|
| 7 |
+
- full
|
| 8 |
- generated_from_trainer
|
| 9 |
model-index:
|
| 10 |
- name: stackexchange_engineering
|
|
|
|
| 16 |
|
| 17 |
# stackexchange_engineering
|
| 18 |
|
| 19 |
+
This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B) on the mlfoundations-dev/stackexchange_engineering dataset.
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
- Loss: 0.9366
|
| 22 |
|
all_results.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 2.926829268292683,
|
| 3 |
+
"eval_loss": 0.9366496801376343,
|
| 4 |
+
"eval_runtime": 17.6253,
|
| 5 |
+
"eval_samples_per_second": 39.205,
|
| 6 |
+
"eval_steps_per_second": 0.624,
|
| 7 |
+
"total_flos": 125418413752320.0,
|
| 8 |
+
"train_loss": 0.9610127830505371,
|
| 9 |
+
"train_runtime": 2801.3394,
|
| 10 |
+
"train_samples_per_second": 14.047,
|
| 11 |
+
"train_steps_per_second": 0.027
|
| 12 |
+
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 2.926829268292683,
|
| 3 |
+
"eval_loss": 0.9366496801376343,
|
| 4 |
+
"eval_runtime": 17.6253,
|
| 5 |
+
"eval_samples_per_second": 39.205,
|
| 6 |
+
"eval_steps_per_second": 0.624
|
| 7 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 2.926829268292683,
|
| 3 |
+
"total_flos": 125418413752320.0,
|
| 4 |
+
"train_loss": 0.9610127830505371,
|
| 5 |
+
"train_runtime": 2801.3394,
|
| 6 |
+
"train_samples_per_second": 14.047,
|
| 7 |
+
"train_steps_per_second": 0.027
|
| 8 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 2.926829268292683,
|
| 5 |
+
"eval_steps": 500,
|
| 6 |
+
"global_step": 75,
|
| 7 |
+
"is_hyper_param_search": false,
|
| 8 |
+
"is_local_process_zero": true,
|
| 9 |
+
"is_world_process_zero": true,
|
| 10 |
+
"log_history": [
|
| 11 |
+
{
|
| 12 |
+
"epoch": 0.3902439024390244,
|
| 13 |
+
"grad_norm": 6.465833920476205,
|
| 14 |
+
"learning_rate": 5e-06,
|
| 15 |
+
"loss": 1.1247,
|
| 16 |
+
"step": 10
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"epoch": 0.7804878048780488,
|
| 20 |
+
"grad_norm": 1.1862331772202763,
|
| 21 |
+
"learning_rate": 5e-06,
|
| 22 |
+
"loss": 1.018,
|
| 23 |
+
"step": 20
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"epoch": 0.975609756097561,
|
| 27 |
+
"eval_loss": 0.9846493005752563,
|
| 28 |
+
"eval_runtime": 18.0366,
|
| 29 |
+
"eval_samples_per_second": 38.311,
|
| 30 |
+
"eval_steps_per_second": 0.61,
|
| 31 |
+
"step": 25
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 1.170731707317073,
|
| 35 |
+
"grad_norm": 2.162191793586483,
|
| 36 |
+
"learning_rate": 5e-06,
|
| 37 |
+
"loss": 1.0085,
|
| 38 |
+
"step": 30
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"epoch": 1.5609756097560976,
|
| 42 |
+
"grad_norm": 1.9535821700087348,
|
| 43 |
+
"learning_rate": 5e-06,
|
| 44 |
+
"loss": 0.9331,
|
| 45 |
+
"step": 40
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 1.951219512195122,
|
| 49 |
+
"grad_norm": 1.124539760660556,
|
| 50 |
+
"learning_rate": 5e-06,
|
| 51 |
+
"loss": 0.9171,
|
| 52 |
+
"step": 50
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"epoch": 1.9902439024390244,
|
| 56 |
+
"eval_loss": 0.9493349194526672,
|
| 57 |
+
"eval_runtime": 18.0567,
|
| 58 |
+
"eval_samples_per_second": 38.268,
|
| 59 |
+
"eval_steps_per_second": 0.609,
|
| 60 |
+
"step": 51
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"epoch": 2.341463414634146,
|
| 64 |
+
"grad_norm": 0.9405210346947177,
|
| 65 |
+
"learning_rate": 5e-06,
|
| 66 |
+
"loss": 0.9107,
|
| 67 |
+
"step": 60
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"epoch": 2.7317073170731705,
|
| 71 |
+
"grad_norm": 1.8443181229715055,
|
| 72 |
+
"learning_rate": 5e-06,
|
| 73 |
+
"loss": 0.8594,
|
| 74 |
+
"step": 70
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"epoch": 2.926829268292683,
|
| 78 |
+
"eval_loss": 0.9366496801376343,
|
| 79 |
+
"eval_runtime": 16.7048,
|
| 80 |
+
"eval_samples_per_second": 41.365,
|
| 81 |
+
"eval_steps_per_second": 0.658,
|
| 82 |
+
"step": 75
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"epoch": 2.926829268292683,
|
| 86 |
+
"step": 75,
|
| 87 |
+
"total_flos": 125418413752320.0,
|
| 88 |
+
"train_loss": 0.9610127830505371,
|
| 89 |
+
"train_runtime": 2801.3394,
|
| 90 |
+
"train_samples_per_second": 14.047,
|
| 91 |
+
"train_steps_per_second": 0.027
|
| 92 |
+
}
|
| 93 |
+
],
|
| 94 |
+
"logging_steps": 10,
|
| 95 |
+
"max_steps": 75,
|
| 96 |
+
"num_input_tokens_seen": 0,
|
| 97 |
+
"num_train_epochs": 3,
|
| 98 |
+
"save_steps": 500,
|
| 99 |
+
"stateful_callbacks": {
|
| 100 |
+
"TrainerControl": {
|
| 101 |
+
"args": {
|
| 102 |
+
"should_epoch_stop": false,
|
| 103 |
+
"should_evaluate": false,
|
| 104 |
+
"should_log": false,
|
| 105 |
+
"should_save": true,
|
| 106 |
+
"should_training_stop": true
|
| 107 |
+
},
|
| 108 |
+
"attributes": {}
|
| 109 |
+
}
|
| 110 |
+
},
|
| 111 |
+
"total_flos": 125418413752320.0,
|
| 112 |
+
"train_batch_size": 8,
|
| 113 |
+
"trial_name": null,
|
| 114 |
+
"trial_params": null
|
| 115 |
+
}
|
training_eval_loss.png
ADDED
|
training_loss.png
ADDED
|