Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use ninagroot/GPT2-705M-ORIGINAL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ninagroot/GPT2-705M-ORIGINAL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ninagroot/GPT2-705M-ORIGINAL")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ninagroot/GPT2-705M-ORIGINAL") model = AutoModelForCausalLM.from_pretrained("ninagroot/GPT2-705M-ORIGINAL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ninagroot/GPT2-705M-ORIGINAL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ninagroot/GPT2-705M-ORIGINAL" # 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-ORIGINAL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ninagroot/GPT2-705M-ORIGINAL
- SGLang
How to use ninagroot/GPT2-705M-ORIGINAL 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-ORIGINAL" \ --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-ORIGINAL", "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-ORIGINAL" \ --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-ORIGINAL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ninagroot/GPT2-705M-ORIGINAL with Docker Model Runner:
docker model run hf.co/ninagroot/GPT2-705M-ORIGINAL
Commit History
-
Upload tokenizer
Verified signatureb9f4621 -
ninagroot/GPT2-705M
Verified signatureeaddecf -
Upload tokenizer
Verified signature4a0311d -
ninagroot/GPT2-705M
Verified signaturea43035f -
Upload tokenizer
Verified signature01b5ee1 -
ninagroot/GPT2-705M
Verified signatureb8b0bda -
Upload tokenizer
Verified signature6c52f16 -
ninagroot/GPT2-705M
Verified signature26bd401
-
ninagroot/GPT2-705Mtest
Verified signaturec74668b
-
ninagroot/GPT2-705Mtest
Verified signaturef9d19fd -
ninagroot/GPT2-705Mtest
Verified signaturecf27748 -
initial commit
Verified signatured108e27