Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
trl
sft
text-generation-inference
Run this model with HF Jobs
Run opelumen/tmp_test1 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/opelumen/tmp_test1. 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/opelumen/tmp_test1 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/opelumen/tmp_test1. 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/opelumen/tmp_test1. 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 opelumen/tmp_test1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use opelumen/tmp_test1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="opelumen/tmp_test1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("opelumen/tmp_test1") model = AutoModelForCausalLM.from_pretrained("opelumen/tmp_test1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use opelumen/tmp_test1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "opelumen/tmp_test1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "opelumen/tmp_test1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/opelumen/tmp_test1
- SGLang
How to use opelumen/tmp_test1 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 "opelumen/tmp_test1" \ --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": "opelumen/tmp_test1", "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 "opelumen/tmp_test1" \ --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": "opelumen/tmp_test1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use opelumen/tmp_test1 with Docker Model Runner:
docker model run hf.co/opelumen/tmp_test1
End of training
Browse filesFiles changed (12)
- README.mdAdded+57
- config.jsonAdded+39
- generation_config.jsonAdded+6
- logs/events.out.tfevents.1733171346.67bd22207c96.413.0Added+3
- logs/events.out.tfevents.1733171640.67bd22207c96.413.1Added+3
- merges.txtAdded
- model.safetensorsAdded+3
- special_tokens_map.jsonAdded+6
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+20
- training_args.binAdded+3
- vocab.jsonAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657---base_model: openai-community/gpt2library_name: transformersmodel_name: tmp_test1tags:- generated_from_trainer- trl- sftlicence: license---
# Model Card for tmp_test1
This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2).It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```pythonfrom transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"generator = pipeline("text-generation", model="opelumen/tmp_test1", device="cuda")output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]print(output["generated_text"])```
## Training procedure
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/altyvp0024/huggingface/runs/t3lhulb6)
This model was trained with SFT.
### Framework versions
- TRL: 0.12.1- Transformers: 4.46.2- Pytorch: 2.5.1+cu121- Datasets: 3.1.0- Tokenizers: 0.20.3
## Citations
Cite TRL as: ```bibtex@misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}}}```123456789101112131415161718192021222324252627282930313233343536373839{ "_name_or_path": "openai-community/gpt2", "activation_function": "gelu_new", "architectures": [ "GPT2LMHeadModel" ], "attn_pdrop": 0.1, "bos_token_id": 50256, "embd_pdrop": 0.1, "eos_token_id": 50256, "initializer_range": 0.02, "layer_norm_epsilon": 1e-05, "model_type": "gpt2", "n_ctx": 1024, "n_embd": 768, "n_head": 12, "n_inner": null, "n_layer": 12, "n_positions": 1024, "reorder_and_upcast_attn": false, "resid_pdrop": 0.1, "scale_attn_by_inverse_layer_idx": false, "scale_attn_weights": true, "summary_activation": null, "summary_first_dropout": 0.1, "summary_proj_to_labels": true, "summary_type": "cls_index", "summary_use_proj": true, "task_specific_params": { "text-generation": { "do_sample": true, "max_length": 50 } }, "torch_dtype": "float32", "transformers_version": "4.46.2", "use_cache": true, "vocab_size": 50257}123456{ "_from_model_config": true, "bos_token_id": 50256, "eos_token_id": 50256, "transformers_version": "4.46.2"}123version https://git-lfs.github.com/spec/v1oid sha256:93a116aeb2de83a4909493eaa2c635fee5976c6c8f5a483ff14301cdc67702a9size 5559123version https://git-lfs.github.com/spec/v1oid sha256:16d619e362c7ad115bc8e065fa399ac0226b6ed6416bfff7a8d5f3603d3ab8f3size 6124123version https://git-lfs.github.com/spec/v1oid sha256:5f779f67bc57243ba3ea88b208dfc86f4b84911f208605a44f670dea869ca835size 497774208123456{ "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "pad_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}1234567891011121314151617181920{ "add_prefix_space": false, "added_tokens_decoder": { "50256": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "<|endoftext|>", "clean_up_tokenization_spaces": false, "eos_token": "<|endoftext|>", "model_max_length": 1024, "pad_token": "<|endoftext|>", "tokenizer_class": "GPT2Tokenizer", "unk_token": "<|endoftext|>"}123version https://git-lfs.github.com/spec/v1oid sha256:a46c9e76760cb74a8f6807d8887efbaf05c5b3441046a8de79d23773b0ede903size 5496README.mdAdded+57
config.jsonAdded+39
generation_config.jsonAdded+6
logs/events.out.tfevents.1733171346.67bd22207c96.413.0Added+3
logs/events.out.tfevents.1733171640.67bd22207c96.413.1Added+3
merges.txtAdded
model.safetensorsAdded+3
special_tokens_map.jsonAdded+6
tokenizer.jsonAdded
tokenizer_config.jsonAdded+20
training_args.binAdded+3
vocab.jsonAdded