Instructions to use ardanila/gpt2-vector2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ardanila/gpt2-vector2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ardanila/gpt2-vector2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ardanila/gpt2-vector2") model = AutoModelForCausalLM.from_pretrained("ardanila/gpt2-vector2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ardanila/gpt2-vector2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ardanila/gpt2-vector2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ardanila/gpt2-vector2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ardanila/gpt2-vector2
- SGLang
How to use ardanila/gpt2-vector2 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 "ardanila/gpt2-vector2" \ --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": "ardanila/gpt2-vector2", "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 "ardanila/gpt2-vector2" \ --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": "ardanila/gpt2-vector2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ardanila/gpt2-vector2 with Docker Model Runner:
docker model run hf.co/ardanila/gpt2-vector2
Commit History
-
Training in progress, step 12000
904b8b4 -
Training in progress, step 11500
d644225 -
Training in progress, step 11000
c2d2ea1 -
Training in progress, step 10500
1b7c4b7 -
Training in progress, step 10000
a194602 -
Training in progress, step 9500
8c045bd -
Training in progress, step 9000
846be2d -
Training in progress, step 8500
8426689 -
Training in progress, step 8000
cacab5f -
Training in progress, step 7500
5dc45f3 -
Training in progress, step 7000
0bc1ed9 -
Training in progress, step 6500
7bd2f5d -
Training in progress, step 6000
7baf1e5 -
Training in progress, step 5500
3480294 -
Training in progress, step 5000
cadce3b -
Training in progress, step 4500
65a6830 -
Training in progress, step 4000
15fd525 -
Training in progress, step 3500
d042be6 -
Training in progress, step 3000
800f08b -
Training in progress, step 2500
9615f00 -
Training in progress, step 2000
06ddecc -
Training in progress, step 1500
96ea7c8 -
Training in progress, step 1000
912c984 -
Training in progress, step 500
2d0bed9 -
initial commit
cb0d4e3