Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use ldm0612/test_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ldm0612/test_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ldm0612/test_model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ldm0612/test_model") model = AutoModelForCausalLM.from_pretrained("ldm0612/test_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ldm0612/test_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ldm0612/test_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ldm0612/test_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ldm0612/test_model
- SGLang
How to use ldm0612/test_model 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 "ldm0612/test_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ldm0612/test_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ldm0612/test_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ldm0612/test_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ldm0612/test_model with Docker Model Runner:
docker model run hf.co/ldm0612/test_model
End of training
Browse files- README.md +5 -4
- config.json +1 -1
- generation_config.json +1 -1
- merges.txt +0 -0
- model.safetensors +1 -1
- runs/May08_23-31-39_7e3f59b25ca1/events.out.tfevents.1715211233.7e3f59b25ca1.1832.0 +3 -0
- runs/May08_23-47-08_7e3f59b25ca1/events.out.tfevents.1715212032.7e3f59b25ca1.1832.1 +3 -0
- runs/May08_23-47-08_7e3f59b25ca1/events.out.tfevents.1715215081.7e3f59b25ca1.1832.2 +3 -0
- tokenizer.json +0 -0
- training_args.bin +2 -2
- vocab.json +0 -0
README.md
CHANGED
|
@@ -14,6 +14,8 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
# test_model
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
@@ -42,7 +44,6 @@ The following hyperparameters were used during training:
|
|
| 42 |
- lr_scheduler_type: cosine
|
| 43 |
- lr_scheduler_warmup_steps: 1000
|
| 44 |
- num_epochs: 1
|
| 45 |
-
- mixed_precision_training: Native AMP
|
| 46 |
|
| 47 |
### Training results
|
| 48 |
|
|
@@ -50,7 +51,7 @@ The following hyperparameters were used during training:
|
|
| 50 |
|
| 51 |
### Framework versions
|
| 52 |
|
| 53 |
-
- Transformers 4.
|
| 54 |
- Pytorch 2.2.1+cu121
|
| 55 |
-
- Datasets 2.
|
| 56 |
-
- Tokenizers 0.
|
|
|
|
| 14 |
# test_model
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 17 |
+
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 5.6676
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 44 |
- lr_scheduler_type: cosine
|
| 45 |
- lr_scheduler_warmup_steps: 1000
|
| 46 |
- num_epochs: 1
|
|
|
|
| 47 |
|
| 48 |
### Training results
|
| 49 |
|
|
|
|
| 51 |
|
| 52 |
### Framework versions
|
| 53 |
|
| 54 |
+
- Transformers 4.40.1
|
| 55 |
- Pytorch 2.2.1+cu121
|
| 56 |
+
- Datasets 2.19.1
|
| 57 |
+
- Tokenizers 0.19.1
|
config.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
| 33 |
}
|
| 34 |
},
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
-
"transformers_version": "4.
|
| 37 |
"use_cache": true,
|
| 38 |
"vocab_size": 25000
|
| 39 |
}
|
|
|
|
| 33 |
}
|
| 34 |
},
|
| 35 |
"torch_dtype": "float32",
|
| 36 |
+
"transformers_version": "4.40.1",
|
| 37 |
"use_cache": true,
|
| 38 |
"vocab_size": 25000
|
| 39 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 0,
|
| 4 |
"eos_token_id": 0,
|
| 5 |
+
"transformers_version": "4.40.1"
|
| 6 |
}
|
merges.txt
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 420184704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a525f31f3f89704eb5a9d0e6b22b7e1e559f71127a5d3dc067ef43bcc35cedc
|
| 3 |
size 420184704
|
runs/May08_23-31-39_7e3f59b25ca1/events.out.tfevents.1715211233.7e3f59b25ca1.1832.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4a5377f3e2a3d3ffb5ada8a78ee9fe48c4267ccf71258273ffd352f5f24cb3e
|
| 3 |
+
size 4884
|
runs/May08_23-47-08_7e3f59b25ca1/events.out.tfevents.1715212032.7e3f59b25ca1.1832.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f3df938b7e719d0ba9db30878084689c1d3cc0c688e6d2453f1867562fd8824
|
| 3 |
+
size 5238
|
runs/May08_23-47-08_7e3f59b25ca1/events.out.tfevents.1715215081.7e3f59b25ca1.1832.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c53b36227fa00ec8d991f1d30b56faa4193925cec5cd15050a0455026934fb0
|
| 3 |
+
size 901
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6053b460dd4c117f07467a0e261a482d9969cd98e018b34757572d01c0763d52
|
| 3 |
+
size 4984
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|