Text Generation
Transformers
gpt_neox
alignment-handbook
trl
sft
Generated from Trainer
conversational
Instructions to use DatPySci/pythia-410m-sft-full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DatPySci/pythia-410m-sft-full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DatPySci/pythia-410m-sft-full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DatPySci/pythia-410m-sft-full") model = AutoModelForCausalLM.from_pretrained("DatPySci/pythia-410m-sft-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 DatPySci/pythia-410m-sft-full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DatPySci/pythia-410m-sft-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": "DatPySci/pythia-410m-sft-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DatPySci/pythia-410m-sft-full
- SGLang
How to use DatPySci/pythia-410m-sft-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 "DatPySci/pythia-410m-sft-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": "DatPySci/pythia-410m-sft-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 "DatPySci/pythia-410m-sft-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": "DatPySci/pythia-410m-sft-full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DatPySci/pythia-410m-sft-full with Docker Model Runner:
docker model run hf.co/DatPySci/pythia-410m-sft-full
End of training
Browse files- README.md +6 -2
- all_results.json +5 -0
- config.json +30 -0
- eval_results.json +8 -0
README.md
CHANGED
|
@@ -2,11 +2,15 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: EleutherAI/pythia-410m-deduped-v0
|
| 4 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
- trl
|
| 6 |
- sft
|
| 7 |
- generated_from_trainer
|
| 8 |
datasets:
|
| 9 |
-
-
|
| 10 |
model-index:
|
| 11 |
- name: pythia-410m-sft-full
|
| 12 |
results: []
|
|
@@ -17,7 +21,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
# pythia-410m-sft-full
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [EleutherAI/pythia-410m-deduped-v0](https://huggingface.co/EleutherAI/pythia-410m-deduped-v0) on the
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
- Loss: 1.6286
|
| 23 |
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: EleutherAI/pythia-410m-deduped-v0
|
| 4 |
tags:
|
| 5 |
+
- alignment-handbook
|
| 6 |
+
- trl
|
| 7 |
+
- sft
|
| 8 |
+
- generated_from_trainer
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
- generated_from_trainer
|
| 12 |
datasets:
|
| 13 |
+
- HuggingFaceH4/ultrachat_200k
|
| 14 |
model-index:
|
| 15 |
- name: pythia-410m-sft-full
|
| 16 |
results: []
|
|
|
|
| 21 |
|
| 22 |
# pythia-410m-sft-full
|
| 23 |
|
| 24 |
+
This model is a fine-tuned version of [EleutherAI/pythia-410m-deduped-v0](https://huggingface.co/EleutherAI/pythia-410m-deduped-v0) on the HuggingFaceH4/ultrachat_200k dataset.
|
| 25 |
It achieves the following results on the evaluation set:
|
| 26 |
- Loss: 1.6286
|
| 27 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"train_loss": 1.6493343958478666,
|
| 4 |
"train_runtime": 16072.2247,
|
| 5 |
"train_samples": 207865,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
+
"eval_loss": 1.628558874130249,
|
| 4 |
+
"eval_runtime": 657.7588,
|
| 5 |
+
"eval_samples": 23110,
|
| 6 |
+
"eval_samples_per_second": 21.435,
|
| 7 |
+
"eval_steps_per_second": 1.341,
|
| 8 |
"train_loss": 1.6493343958478666,
|
| 9 |
"train_runtime": 16072.2247,
|
| 10 |
"train_samples": 207865,
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "EleutherAI/pythia-410m-deduped-v0",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GPTNeoXForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": true,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 0,
|
| 9 |
+
"classifier_dropout": 0.1,
|
| 10 |
+
"eos_token_id": 0,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout": 0.0,
|
| 13 |
+
"hidden_size": 1024,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 4096,
|
| 16 |
+
"layer_norm_eps": 1e-05,
|
| 17 |
+
"max_position_embeddings": 2048,
|
| 18 |
+
"model_type": "gpt_neox",
|
| 19 |
+
"num_attention_heads": 16,
|
| 20 |
+
"num_hidden_layers": 24,
|
| 21 |
+
"rope_scaling": null,
|
| 22 |
+
"rotary_emb_base": 10000,
|
| 23 |
+
"rotary_pct": 0.25,
|
| 24 |
+
"tie_word_embeddings": false,
|
| 25 |
+
"torch_dtype": "bfloat16",
|
| 26 |
+
"transformers_version": "4.39.3",
|
| 27 |
+
"use_cache": true,
|
| 28 |
+
"use_parallel_residual": true,
|
| 29 |
+
"vocab_size": 50304
|
| 30 |
+
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"eval_loss": 1.628558874130249,
|
| 4 |
+
"eval_runtime": 657.7588,
|
| 5 |
+
"eval_samples": 23110,
|
| 6 |
+
"eval_samples_per_second": 21.435,
|
| 7 |
+
"eval_steps_per_second": 1.341
|
| 8 |
+
}
|