Instructions to use imthanhlv/vigpt2medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use imthanhlv/vigpt2medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="imthanhlv/vigpt2medium")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("imthanhlv/vigpt2medium") model = AutoModelForCausalLM.from_pretrained("imthanhlv/vigpt2medium", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use imthanhlv/vigpt2medium with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "imthanhlv/vigpt2medium" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "imthanhlv/vigpt2medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/imthanhlv/vigpt2medium
- SGLang
How to use imthanhlv/vigpt2medium 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 "imthanhlv/vigpt2medium" \ --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": "imthanhlv/vigpt2medium", "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 "imthanhlv/vigpt2medium" \ --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": "imthanhlv/vigpt2medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use imthanhlv/vigpt2medium with Docker Model Runner:
docker model run hf.co/imthanhlv/vigpt2medium
Commit History
-
Saving weights and logs of step 1850000
a3d5eb4 -
Saving weights and logs of step 1800000
33a785f
-
Saving weights and logs of step 1750000
9dd79d1
-
Saving weights and logs of step 1700000
02040b5 -
Saving weights and logs of step 1650000
c381727
-
Saving weights and logs of step 1600000
0caeb72
-
Saving weights and logs of step 1550000
c9f58bf
-
Saving weights and logs of step 1500000
1a1c77b -
Saving weights and logs of step 1450000
abe320e
-
Saving weights and logs of step 1400000
b7f4bf5
-
Saving weights and logs of step 1350000
828d6b6 -
Saving weights and logs of step 1300000
5fd3d5d
-
Saving weights and logs of step 1250000
995304b
-
Saving weights and logs of step 1200000
87bb987 -
Saving weights and logs of step 1150000
1295f54
-
Saving weights and logs of step 1100000
582d31b
-
Saving weights and logs of step 1050000
ee50944 -
Saving weights and logs of step 1000000
28f9bda
-
Saving weights and logs of step 950000
4790d87
-
Saving weights and logs of step 900000
f4dcc20
-
Saving weights and logs of step 850000
4e198e1 -
Saving weights and logs of step 800000
e6d50a6
-
Saving weights and logs of step 750000
8dc3382
-
Saving weights and logs of step 700000
ff20b63 -
Saving weights and logs of step 650000
c2979bb
-
Saving weights and logs of step 600000
45a31ab
-
Saving weights and logs of step 550000
90be602 -
Saving weights and logs of step 500000
d583ffd
-
Saving weights and logs of step 450000
2dc773a
-
Saving weights and logs of step 400000
db1a773 -
Saving weights and logs of step 350000
0b6a623
-
Saving weights and logs of step 300000
182f1f9
-
Saving weights and logs of step 250000
449f3e1
-
Saving weights and logs of step 200000
9ee7f03 -
Saving weights and logs of step 150000
53cc18a
-
Saving weights and logs of step 100000
b12d25d
-
Saving weights and logs of step 50000
ea1a2c2 -
Saving weights and logs of step 250000
484deb0
-
Saving weights and logs of step 200000
2016d95
-
Saving weights and logs of step 150000
669e926
-
Saving weights and logs of step 100000
04e6680 -
Saving weights and logs of step 50000
6e1c1f7