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 (9)
12 unmodified lines1314151617181913 unmodified lines33343536373839404142434445464748495051525354555657585912 unmodified linesThis model is a fine-tuned version of [](https://huggingface.co/) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 3.6575## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.00025- train_batch_size: 1- eval_batch_size: 8- seed: 42- gradient_accumulation_steps: 2- total_train_batch_size: 2- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 100- num_epochs: 6- mixed_precision_training: Native AMP### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| 2.9814 | 1.0 | 786 | 3.7914 || 2.5963 | 2.0 | 1572 | 3.6927 || 2.3478 | 3.0 | 2358 | 3.7172 || 2.0341 | 4.0 | 3144 | 3.6845 || 1.7373 | 5.0 | 3930 | 3.6596 || 1.7065 | 6.0 | 4716 | 3.6575 |### Framework versions12 unmodified lines1314151617181913 unmodified lines33343536373839404142434445464748495051525354555612 unmodified linesThis model is a fine-tuned version of [](https://huggingface.co/) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 3.6555## Model description13 unmodified linesThe following hyperparameters were used during training:- learning_rate: 0.00025- train_batch_size: 16- eval_batch_size: 8- seed: 42- gradient_accumulation_steps: 2- 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: 100- num_epochs: 3- mixed_precision_training: Native AMP### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| 3.073 | 1.0 | 194 | 3.6424 || 2.0148 | 2.0 | 389 | 3.6091 || 1.3653 | 2.99 | 582 | 3.6555 |### Framework versions
10 unmodified lines11121314151617181920216 unmodified lines282930313210 unmodified lines"layer_norm_epsilon": 1e-05,"model_type": "gpt2","n_embd": 1536,"n_head": 16,"n_inner": null,"n_layer": 24,"n_positions": 256,"pad_token_id": 0,"reorder_and_upcast_attn": false,"resid_pdrop": 0.0,"scale_attn_by_inverse_layer_idx": false,6 unmodified lines"torch_dtype": "float32","transformers_version": "4.39.1","use_cache": true,"vocab_size": 32000}10 unmodified lines11121314151617181920216 unmodified lines282930313210 unmodified lines"layer_norm_epsilon": 1e-05,"model_type": "gpt2","n_embd": 1536,"n_head": 8,"n_inner": null,"n_layer": 24,"n_positions": 60,"pad_token_id": 50256,"reorder_and_upcast_attn": false,"resid_pdrop": 0.0,"scale_attn_by_inverse_layer_idx": false,6 unmodified lines"torch_dtype": "float32","transformers_version": "4.39.1","use_cache": true,"vocab_size": 50257}
1 unmodified line2345671 unmodified line"_from_model_config": true,"bos_token_id": 50256,"eos_token_id": 50256,"pad_token_id": 0,"transformers_version": "4.39.1"}1 unmodified line2345671 unmodified line"_from_model_config": true,"bos_token_id": 50256,"eos_token_id": 50256,"pad_token_id": 50256,"transformers_version": "4.39.1"}
123version https://git-lfs.github.com/spec/v1oid sha256:6c91e31860b19345b05e0f1e9e1ba2de97ffc56b229cb792f4542af9b151e2afsize 2918049568123version https://git-lfs.github.com/spec/v1oid sha256:2abf6ffbb842f8f7acca2c6c3bd5c2c8b0897130820c1844f28256896bf9f235size 3029016352
123version https://git-lfs.github.com/spec/v1oid sha256:fcfd9e49ca484e635452b2c37963b8444882b053cdd6140ddd25243805cb1a99size 119441 unmodified line234561 unmodified line"bos_token": "<s>","eos_token": "</s>","pad_token": "<pad>","unk_token": "<|endoftext|>"}1 unmodified line234567891011121 unmodified line"bos_token": "<s>","eos_token": "</s>","pad_token": "<pad>","unk_token": {"content": "<unk>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false}}
123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 4997231234567815 unmodified lines242526272829303132333435363738394041424344{"add_prefix_space": false,"added_tokens_decoder": {"0": {"content": "<pad>","lstrip": false,"normalized": false,"rstrip": false,15 unmodified lines"rstrip": false,"single_word": false,"special": true},"4312": {"content": "<|endoftext|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true}},"bos_token": "<s>","clean_up_tokenization_spaces": true,"eos_token": "</s>","model_max_length": 128,"pad_token": "<pad>","tokenizer_class": "GPT2Tokenizer","unk_token": "<|endoftext|>"}1234567891015 unmodified lines2627282930313233343536373839404142{"add_bos_token": true,"add_eos_token": false,"add_prefix_space": true,"added_tokens_decoder": {"0": {"content": "<unk>","lstrip": false,"normalized": false,"rstrip": false,15 unmodified lines"rstrip": false,"single_word": false,"special": true}},"bos_token": "<s>","clean_up_tokenization_spaces": false,"eos_token": "</s>","legacy": true,"model_max_length": 128,"pad_token": "<pad>","sp_model_kwargs": {},"spaces_between_special_tokens": false,"tokenizer_class": "LlamaTokenizer","unk_token": "<unk>","use_default_system_prompt": false}
123version https://git-lfs.github.com/spec/v1oid sha256:aa0847ab599c58a1133dac29dd7ae134718e1285515ee60a80d4d30e0cb92086size 4984123version https://git-lfs.github.com/spec/v1oid sha256:c40e2376c3eb0011bb960b01f5109ca28ebed0d38154671666787999fe15f16csize 4984
README.md+7-10
config.json+4-4
generation_config.json+1-1
model.safetensors+2-2
runs/Apr05_15-32-40_gcn33.local.snellius.surf.nl/events.out.tfevents.1712323967.gcn33.local.snellius.surf.nl.3834045.0Added+3
special_tokens_map.json+7-1
tokenizer.modelAdded+3
tokenizer_config.json+11-13
training_args.bin+1-1