Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use ablam/distilgpt2_fine_tuned_gcode with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ablam/distilgpt2_fine_tuned_gcode with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ablam/distilgpt2_fine_tuned_gcode")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ablam/distilgpt2_fine_tuned_gcode") model = AutoModelForCausalLM.from_pretrained("ablam/distilgpt2_fine_tuned_gcode", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ablam/distilgpt2_fine_tuned_gcode with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ablam/distilgpt2_fine_tuned_gcode" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ablam/distilgpt2_fine_tuned_gcode", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ablam/distilgpt2_fine_tuned_gcode
- SGLang
How to use ablam/distilgpt2_fine_tuned_gcode 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 "ablam/distilgpt2_fine_tuned_gcode" \ --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": "ablam/distilgpt2_fine_tuned_gcode", "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 "ablam/distilgpt2_fine_tuned_gcode" \ --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": "ablam/distilgpt2_fine_tuned_gcode", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ablam/distilgpt2_fine_tuned_gcode with Docker Model Runner:
docker model run hf.co/ablam/distilgpt2_fine_tuned_gcode
Commit History
-
Adding `safetensors` variant of this model
This is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.95be452
-
update model card README.md
34da971 -
End of training
e404722 -
Training in progress, step 50000
e9a4472 -
Training in progress, step 44500
7fac47f -
Training in progress, step 39000
c6fa712 -
Training in progress, step 33500
f37398c -
Training in progress, step 28000
fdb84e3 -
Training in progress, step 22500
ebd5864 -
Training in progress, step 17000
0d2c1ab -
Training in progress, step 11500
66f2190 -
Training in progress, step 500
f6511b3 -
Training in progress, step 27500
e11cfae -
Training in progress, step 22000
31e1b83 -
Training in progress, step 16500
5ade2e0 -
Training in progress, step 11000
fa97cec -
Training in progress, step 5500
116cb99
-
Training in progress, step 500
e8ffb60 -
Merge branch 'main' of https://huggingface.co/ablam/distilgpt2_fine_tuned_gcode
2f476c2
-
End of training
e38d955 -
Create README.md
a120f49 -
Training in progress, step 11000
90dc2e1 -
Training in progress, step 7500
37e618e -
Training in progress, step 4000
8326c51 -
Training in progress, step 500
cea2adb
-
Training in progress, step 223000
c4c6e8f -
Training in progress, step 215000
f617022 -
Training in progress, step 206000
9c3fce8 -
Training in progress, step 198500
c93ee88 -
Training in progress, step 191000
929f2a7 -
Training in progress, step 184000
96407d6 -
Training in progress, step 173000
10fe45a -
Training in progress, step 163000
7d24ef6 -
Training in progress, step 155000
57c63c4 -
Training in progress, step 148000
73bbabc -
Training in progress, step 141000
4c34dde -
Training in progress, step 134000
531e1d1 -
Training in progress, step 126500
beaae3a -
Training in progress, step 119500
223b21e -
Training in progress, step 112500
a8f3951 -
Training in progress, step 105500
b35b921 -
Training in progress, step 98000
01b6629 -
Training in progress, step 90500
1b909bc -
Training in progress, step 83000
c719615 -
Training in progress, step 75500
b740867 -
Training in progress, step 68000
62e0f04 -
Training in progress, step 60500
3250333 -
Training in progress, step 53000
76ef978 -
Training in progress, step 45500
bef1773 -
Training in progress, step 38000
4dad386