Instructions to use Kaspar/gpt2_ecco_pretrained with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kaspar/gpt2_ecco_pretrained with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kaspar/gpt2_ecco_pretrained")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kaspar/gpt2_ecco_pretrained") model = AutoModelForCausalLM.from_pretrained("Kaspar/gpt2_ecco_pretrained", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kaspar/gpt2_ecco_pretrained with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kaspar/gpt2_ecco_pretrained" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kaspar/gpt2_ecco_pretrained", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Kaspar/gpt2_ecco_pretrained
- SGLang
How to use Kaspar/gpt2_ecco_pretrained 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 "Kaspar/gpt2_ecco_pretrained" \ --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": "Kaspar/gpt2_ecco_pretrained", "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 "Kaspar/gpt2_ecco_pretrained" \ --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": "Kaspar/gpt2_ecco_pretrained", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Kaspar/gpt2_ecco_pretrained with Docker Model Runner:
docker model run hf.co/Kaspar/gpt2_ecco_pretrained
Download training_args.bin from Kaspar/gpt2_ecco_pretrained: direct link, hf CLI and curl.
- Browser
- Download file 5.2 kB
-
https://huggingface.co/Kaspar/gpt2_ecco_pretrained/resolve/main/training_args.bin
- Command line
-
hf download hf://Kaspar/gpt2_ecco_pretrained/training_args.bin
-
curl -L -o training_args.bin https://huggingface.co/Kaspar/gpt2_ecco_pretrained/resolve/main/training_args.bin
5.2 kB
- Xet hash:
- 141b45d1131cb067845a75a52b6311294f59619c2df44ca24ee98bd6ac6a716c
- Size of remote file:
- 5.2 kB
- SHA256:
- 91b17ebda35f81338478893825caaaccf0516193bf3722189c8da5babafcb751
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.