Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Run this model with HF Jobs
Run ninagroot/GPT2-705M-RUN4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/ninagroot/GPT2-705M-RUN4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ninagroot/GPT2-705M-RUN4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ninagroot/GPT2-705M-RUN4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ninagroot/GPT2-705M-RUN4. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ninagroot/GPT2-705M-RUN4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ninagroot/GPT2-705M-RUN4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ninagroot/GPT2-705M-RUN4")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ninagroot/GPT2-705M-RUN4") model = AutoModelForCausalLM.from_pretrained("ninagroot/GPT2-705M-RUN4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ninagroot/GPT2-705M-RUN4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ninagroot/GPT2-705M-RUN4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ninagroot/GPT2-705M-RUN4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ninagroot/GPT2-705M-RUN4
- SGLang
How to use ninagroot/GPT2-705M-RUN4 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 "ninagroot/GPT2-705M-RUN4" \ --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": "ninagroot/GPT2-705M-RUN4", "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 "ninagroot/GPT2-705M-RUN4" \ --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": "ninagroot/GPT2-705M-RUN4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ninagroot/GPT2-705M-RUN4 with Docker Model Runner:
docker model run hf.co/ninagroot/GPT2-705M-RUN4
ninagroot/GPT2-705M
Browse filesFiles changed (4)
12 unmodified lines131415161617181921 unmodified lines414243444445464748495051525354515253545556575859606162636465666768697071727312 unmodified lines
This model is a fine-tuned version of [](https://huggingface.co/) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 5.1361- Loss: 3.6046
## Model description
21 unmodified lines- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 300- num_epochs: 4- num_epochs: 20- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| 8.1174 | 1.0 | 3 | 7.4247 || 6.2796 | 2.0 | 6 | 6.3362 || 5.6153 | 3.0 | 9 | 5.6666 || 4.8481 | 4.0 | 12 | 5.1361 || 8.0336 | 1.0 | 3 | 7.3770 || 6.2535 | 2.0 | 6 | 6.3128 || 5.6213 | 3.0 | 9 | 5.6716 || 4.8242 | 4.0 | 12 | 5.1521 || 4.6266 | 5.0 | 15 | 4.9789 || 4.4097 | 6.0 | 18 | 4.7306 || 4.0358 | 7.0 | 21 | 4.5332 || 4.0027 | 8.0 | 24 | 4.4014 || 3.8638 | 9.0 | 27 | 4.1175 || 3.5414 | 10.0 | 30 | 4.0355 || 3.4701 | 11.0 | 33 | 3.8834 || 3.4822 | 12.0 | 36 | 3.8336 || 3.0602 | 13.0 | 39 | 3.7213 || 3.1109 | 14.0 | 42 | 3.7379 || 2.9087 | 15.0 | 45 | 3.7389 || 2.7124 | 16.0 | 48 | 3.6220 || 2.5867 | 17.0 | 51 | 3.7192 || 2.4577 | 18.0 | 54 | 3.5953 || 2.279 | 19.0 | 57 | 3.7648 || 2.3218 | 20.0 | 60 | 3.6046 |
### Framework versions1223version https://git-lfs.github.com/spec/v1oid sha256:1a9af2005cc75218ca636dbe06bbd65e30abdc4a5573abfb5df5688d6e3cec52oid sha256:ac64e7d51b66be7b695ce5f77da518218607444f579fe548439a3ad9fb4164f1size 2748401440123version https://git-lfs.github.com/spec/v1oid sha256:dee410478de99ff6bbe4a90fdae59dbe432a47cd6712dae857716a580a017a39size 227671223version https://git-lfs.github.com/spec/v1oid sha256:a30852277f467352b48aea78723b61253783bc15f07264ebd423e1691017aae0oid sha256:4425104d4ab90f66d74aec7b2ddb7ff0c53d6e50186c2d9c2928e9c6a711a4ccsize 4984README.md+22-6
model.safetensors+1-1
runs/Apr29_16-13-26_gcn21.local.snellius.surf.nl/events.out.tfevents.1714400015.gcn21.local.snellius.surf.nl.467660.0Added+3
training_args.bin+1-1