Text Generation
Transformers
TensorBoard
Safetensors
English
gpt2
Generated from Trainer
text-generation-inference
Run this model with HF Jobs
Run progs2002/star-trek-tng-script-generator 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/progs2002/star-trek-tng-script-generator. 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/progs2002/star-trek-tng-script-generator 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/progs2002/star-trek-tng-script-generator. 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/progs2002/star-trek-tng-script-generator. 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 progs2002/star-trek-tng-script-generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use progs2002/star-trek-tng-script-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="progs2002/star-trek-tng-script-generator")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("progs2002/star-trek-tng-script-generator") model = AutoModelForCausalLM.from_pretrained("progs2002/star-trek-tng-script-generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use progs2002/star-trek-tng-script-generator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "progs2002/star-trek-tng-script-generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "progs2002/star-trek-tng-script-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/progs2002/star-trek-tng-script-generator
- SGLang
How to use progs2002/star-trek-tng-script-generator 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 "progs2002/star-trek-tng-script-generator" \ --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": "progs2002/star-trek-tng-script-generator", "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 "progs2002/star-trek-tng-script-generator" \ --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": "progs2002/star-trek-tng-script-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use progs2002/star-trek-tng-script-generator with Docker Model Runner:
docker model run hf.co/progs2002/star-trek-tng-script-generator
End of training
Browse filesFiles changed (5)
5 unmodified lines678910111213141516171819202122232425262718 unmodified lines464748495051525354555657585960616263646566676869707172731 unmodified line757677785 unmodified linesmodel-index:- name: star-trek-tng-script-generatorresults: []datasets:- progs2002/star-trek-tng-scriptslanguage:- en---<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. --># pre-processing and training codehttps://github.com/progs2002/StarTrekTNG-ScriptGenerator# star-trek-tng-script-generatorThis model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 2.8036## Model description18 unmodified lines- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 100- num_epochs: 2### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:----:|:---------------:|| 3.1852 | 0.13 | 500 | 3.0649 || 3.0477 | 0.26 | 1000 | 3.0007 || 2.9831 | 0.38 | 1500 | 2.9711 || 2.9662 | 0.51 | 2000 | 2.9474 || 2.9275 | 0.64 | 2500 | 2.9116 || 2.8711 | 0.77 | 3000 | 2.8952 || 2.8551 | 0.89 | 3500 | 2.8771 || 2.7449 | 1.02 | 4000 | 2.8645 || 2.4553 | 1.15 | 4500 | 2.8441 || 2.4575 | 1.28 | 5000 | 2.8457 || 2.4452 | 1.4 | 5500 | 2.8329 || 2.4256 | 1.53 | 6000 | 2.8180 || 2.3958 | 1.66 | 6500 | 2.8123 || 2.4084 | 1.79 | 7000 | 2.8049 || 2.3855 | 1.92 | 7500 | 2.8044 |### Framework versions1 unmodified line- Transformers 4.35.2- Pytorch 2.1.0+cu121- Datasets 2.16.1- Tokenizers 0.15.05 unmodified lines678910111213141516171819202118 unmodified lines4041424344454647484950515253545556575859606162636465666768697071727374751 unmodified line777879805 unmodified linesmodel-index:- name: star-trek-tng-script-generatorresults: []---<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. --># star-trek-tng-script-generatorThis model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 2.8459## Model description18 unmodified lines- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: cosine- lr_scheduler_warmup_steps: 50- num_epochs: 3### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:-----:|:-----:|:---------------:|| 3.1502 | 0.13 | 500 | 3.0233 || 3.0538 | 0.26 | 1000 | 2.9728 || 2.9951 | 0.38 | 1500 | 2.9437 || 2.9891 | 0.51 | 2000 | 2.9125 || 2.9289 | 0.64 | 2500 | 2.9159 || 2.9091 | 0.77 | 3000 | 2.9008 || 2.8916 | 0.89 | 3500 | 2.8752 || 2.8122 | 1.02 | 4000 | 2.8881 || 2.5224 | 1.15 | 4500 | 2.8896 || 2.5284 | 1.28 | 5000 | 2.8667 || 2.5191 | 1.4 | 5500 | 2.8599 || 2.5119 | 1.53 | 6000 | 2.8488 || 2.4808 | 1.66 | 6500 | 2.8296 || 2.4601 | 1.79 | 7000 | 2.8081 || 2.4331 | 1.91 | 7500 | 2.7993 || 2.3716 | 2.04 | 8000 | 2.8518 || 2.1528 | 2.17 | 8500 | 2.8634 || 2.1276 | 2.3 | 9000 | 2.8617 || 2.1329 | 2.43 | 9500 | 2.8489 || 2.1135 | 2.55 | 10000 | 2.8446 || 2.1259 | 2.68 | 10500 | 2.8461 || 2.1142 | 2.81 | 11000 | 2.8472 || 2.1071 | 2.94 | 11500 | 2.8459 |### Framework versions1 unmodified line- Transformers 4.35.2- Pytorch 2.1.0+cu121- Datasets 2.16.1- Tokenizers 0.15.0
123version https://git-lfs.github.com/spec/v1oid sha256:9355cc23b5f74b3b858d4f402c43ad57fd3ec6e56c77a60baf506155c63cb4e3size 497774208123version https://git-lfs.github.com/spec/v1oid sha256:7924931408665a3a2ab6162c83aa658f758ddb6af955a05f0470024bb525eaf1size 497774208
123version https://git-lfs.github.com/spec/v1oid sha256:1516ad00598b2f204c3b8bdb675e7917e5803de8aa940910a8e2521c8d2b9aaesize 10208123version https://git-lfs.github.com/spec/v1oid sha256:189e76e113a3560fca7b783af81302c893a7e68264b6395b06442873f5fe7d27size 14685123version https://git-lfs.github.com/spec/v1oid sha256:51e5e009e728175c03f3bd3ef428a6117521748fce818f4193725a2b7582feb2size 4600123version https://git-lfs.github.com/spec/v1oid sha256:63fa78bc83d07658397fff0aab8e7f6ba9d6b4d5e46f07dc8f7c3bcf7eb06289size 4600
README.md+29-27
model.safetensors+1-1
runs/Jan24_06-23-30_2545872ab51a/events.out.tfevents.1706077411.2545872ab51a.1303.0Added+3
runs/Jan24_06-38-51_2545872ab51a/events.out.tfevents.1706078332.2545872ab51a.5361.0Added+3
training_args.bin+1-1