Text Generation
Transformers
Safetensors
gpt2
trl
sft
Generated from Trainer
text-generation-inference
Instructions to use bachephysicdun/HW2-supervised with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bachephysicdun/HW2-supervised with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bachephysicdun/HW2-supervised")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bachephysicdun/HW2-supervised") model = AutoModelForCausalLM.from_pretrained("bachephysicdun/HW2-supervised") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bachephysicdun/HW2-supervised with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bachephysicdun/HW2-supervised" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bachephysicdun/HW2-supervised", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bachephysicdun/HW2-supervised
- SGLang
How to use bachephysicdun/HW2-supervised 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 "bachephysicdun/HW2-supervised" \ --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": "bachephysicdun/HW2-supervised", "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 "bachephysicdun/HW2-supervised" \ --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": "bachephysicdun/HW2-supervised", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bachephysicdun/HW2-supervised with Docker Model Runner:
docker model run hf.co/bachephysicdun/HW2-supervised
Training in progress, step 36
Browse files- config.json +1 -0
- model.safetensors +1 -1
- special_tokens_map.json +1 -1
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
| 17 |
"n_inner": null,
|
| 18 |
"n_layer": 12,
|
| 19 |
"n_positions": 1024,
|
|
|
|
| 20 |
"reorder_and_upcast_attn": false,
|
| 21 |
"resid_pdrop": 0.1,
|
| 22 |
"scale_attn_by_inverse_layer_idx": false,
|
|
|
|
| 17 |
"n_inner": null,
|
| 18 |
"n_layer": 12,
|
| 19 |
"n_positions": 1024,
|
| 20 |
+
"pad_token_id": 50256,
|
| 21 |
"reorder_and_upcast_attn": false,
|
| 22 |
"resid_pdrop": 0.1,
|
| 23 |
"scale_attn_by_inverse_layer_idx": false,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497774208
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e66f9ff0694ec30b618a9e8d10d53248ff3417772db830548736ae05b2149db4
|
| 3 |
size 497774208
|
special_tokens_map.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"bos_token": "<|endoftext|>",
|
| 3 |
"eos_token": "<|endoftext|>",
|
| 4 |
-
"pad_token": "<
|
| 5 |
"unk_token": "<|endoftext|>"
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"bos_token": "<|endoftext|>",
|
| 3 |
"eos_token": "<|endoftext|>",
|
| 4 |
+
"pad_token": "<|endoftext|>",
|
| 5 |
"unk_token": "<|endoftext|>"
|
| 6 |
}
|
tokenizer_config.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
"clean_up_tokenization_spaces": true,
|
| 15 |
"eos_token": "<|endoftext|>",
|
| 16 |
"model_max_length": 1024,
|
| 17 |
-
"pad_token": "<
|
| 18 |
"tokenizer_class": "GPT2Tokenizer",
|
| 19 |
"unk_token": "<|endoftext|>"
|
| 20 |
}
|
|
|
|
| 14 |
"clean_up_tokenization_spaces": true,
|
| 15 |
"eos_token": "<|endoftext|>",
|
| 16 |
"model_max_length": 1024,
|
| 17 |
+
"pad_token": "<|endoftext|>",
|
| 18 |
"tokenizer_class": "GPT2Tokenizer",
|
| 19 |
"unk_token": "<|endoftext|>"
|
| 20 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5432
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dde9e26f29c05c06278a9aa275e453c30f7cf5703ad8f7f0ad319cff3e619e8f
|
| 3 |
size 5432
|