Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Run this model with HF Jobs
Run ninagroot/GPT2-705-RUN1 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-705-RUN1. 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-705-RUN1 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-705-RUN1. 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-705-RUN1. 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-705-RUN1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ninagroot/GPT2-705-RUN1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ninagroot/GPT2-705-RUN1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ninagroot/GPT2-705-RUN1") model = AutoModelForCausalLM.from_pretrained("ninagroot/GPT2-705-RUN1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ninagroot/GPT2-705-RUN1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ninagroot/GPT2-705-RUN1" # 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-705-RUN1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ninagroot/GPT2-705-RUN1
- SGLang
How to use ninagroot/GPT2-705-RUN1 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-705-RUN1" \ --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-705-RUN1", "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-705-RUN1" \ --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-705-RUN1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ninagroot/GPT2-705-RUN1 with Docker Model Runner:
docker model run hf.co/ninagroot/GPT2-705-RUN1
ninagroot/GPT2-705Mtest
Browse filesFiles changed (4)
12 unmodified lines131415161617181913 unmodified lines333435363637383940404142434445461 unmodified line484950505152535455565758596061515253545556575859606162636465666768697071727312 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: 6.9571- Loss: 6.0919
## Model description
13 unmodified lines
The following hyperparameters were used during training:- learning_rate: 0.00025- train_batch_size: 32- train_batch_size: 8- eval_batch_size: 8- seed: 42- gradient_accumulation_steps: 4- total_train_batch_size: 128- total_train_batch_size: 32- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 50- num_epochs: 20- mixed_precision_training: Native AMP
1 unmodified line
| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| No log | 0.57 | 1 | 10.8430 || No log | 1.71 | 3 | 9.6245 || No log | 2.86 | 5 | 8.3578 || No log | 4.0 | 7 | 7.6791 || No log | 4.57 | 8 | 7.6125 || No log | 5.71 | 10 | 7.1608 || No log | 6.86 | 12 | 7.0488 || No log | 8.0 | 14 | 7.0351 || No log | 8.57 | 15 | 7.0075 || No log | 9.71 | 17 | 6.9691 || No log | 10.86 | 19 | 6.9580 || 7.4341 | 11.43 | 20 | 6.9571 || No log | 1.0 | 7 | 7.9651 || No log | 2.0 | 14 | 7.1619 || 7.2683 | 3.0 | 21 | 6.5175 || 7.2683 | 4.0 | 28 | 5.9957 || 7.2683 | 5.0 | 35 | 5.5861 || 4.9213 | 6.0 | 42 | 5.4206 || 4.9213 | 7.0 | 49 | 5.3658 || 4.9213 | 8.0 | 56 | 5.4741 || 3.653 | 9.0 | 63 | 5.4698 || 3.653 | 10.0 | 70 | 5.5100 || 3.653 | 11.0 | 77 | 5.6280 || 2.7835 | 12.0 | 84 | 5.7409 || 2.7835 | 13.0 | 91 | 5.8478 || 2.7835 | 14.0 | 98 | 5.9625 || 2.1972 | 15.0 | 105 | 6.0096 || 2.1972 | 16.0 | 112 | 6.0052 || 2.1972 | 17.0 | 119 | 6.0647 || 1.7144 | 18.0 | 126 | 6.0797 || 1.7144 | 19.0 | 133 | 6.0888 || 1.4404 | 20.0 | 140 | 6.0919 |
### Framework versions1223version https://git-lfs.github.com/spec/v1oid sha256:70faebe0809ca7205d8d197f52a43a23f8eeaadee5a9ec0005fbe100adc8ee74oid sha256:f8f5286dca39854db17c3ddf3aaa69ed18a8f1e1e34651aa8f939d4ee13f5b2fsize 2796386080123version https://git-lfs.github.com/spec/v1oid sha256:9c580b5c9f61d812514187cdb2a61705218bdc27a0acaea90aaa9e0030a1a4e8size 118151223version https://git-lfs.github.com/spec/v1oid sha256:c9ba3507956ac8f0c49f71b7bb013008a63e70f634ebf0e9d9a6924f3f9df732oid sha256:31f627acde0acd2271fdd20aa65f4e7b4d840b45122d4ca5a25c12dcc9edb868size 4984README.md+24-15
model.safetensors+1-1
runs/Apr16_13-36-06_gcn62.local.snellius.surf.nl/events.out.tfevents.1713267373.gcn62.local.snellius.surf.nl.2830995.0Added+3
training_args.bin+1-1