Instructions to use timo13113/calc-gpt-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use timo13113/calc-gpt-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="timo13113/calc-gpt-2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("timo13113/calc-gpt-2") model = AutoModelForCausalLM.from_pretrained("timo13113/calc-gpt-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use timo13113/calc-gpt-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "timo13113/calc-gpt-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "timo13113/calc-gpt-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/timo13113/calc-gpt-2
- SGLang
How to use timo13113/calc-gpt-2 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 "timo13113/calc-gpt-2" \ --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": "timo13113/calc-gpt-2", "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 "timo13113/calc-gpt-2" \ --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": "timo13113/calc-gpt-2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use timo13113/calc-gpt-2 with Docker Model Runner:
docker model run hf.co/timo13113/calc-gpt-2
Commit History
-
Update README.md
Verified signatured5f4c4c -
Create README.md
Verified signature6a9d2d0
-
Training in progress, step 8700
Verified signature6a6c8a8 -
Training in progress, step 8400
Verified signatured7bd8bb -
Training in progress, step 8100
Verified signature32d32ca -
Training in progress, step 7800
Verified signaturea79aa57 -
Training in progress, step 7500
Verified signaturec37dacc -
Training in progress, step 7200
Verified signaturecda1179 -
Training in progress, step 6900
Verified signature0992dbd -
Training in progress, step 6600
Verified signature5ff165b -
Training in progress, step 6300
Verified signatureac8a737 -
Training in progress, step 6000
Verified signaturec54fb9a -
Training in progress, step 5700
Verified signatureb0b3ff3 -
Training in progress, step 5400
Verified signature17f2560 -
Training in progress, step 5100
Verified signaturebb6c5d8 -
Training in progress, step 4800
Verified signatureebaaa5b -
Training in progress, step 4500
Verified signature87a230e -
Training in progress, step 4200
Verified signatureaa9ef98 -
Training in progress, step 3900
Verified signatureca70c6e -
Training in progress, step 3600
Verified signature626a063 -
Training in progress, step 3300
Verified signature37f3596 -
Training in progress, step 3000
Verified signaturee2861e7 -
Training in progress, step 2700
Verified signature16801bf -
Training in progress, step 2400
Verified signature54470c0 -
Training in progress, step 2100
Verified signature2833e03 -
Training in progress, step 1800
Verified signature177e68c -
Training in progress, step 1500
Verified signaturebe7b82b -
Training in progress, step 1200
Verified signature86db614 -
Training in progress, step 900
Verified signature0c9beb0 -
Training in progress, step 600
Verified signature06fccdc -
Training in progress, step 300
Verified signaturec2b0d18 -
Training in progress, step 7500
Verified signaturebffafb6 -
Training in progress, step 7200
Verified signature273aeae -
Training in progress, step 6900
Verified signatured94edea -
Training in progress, step 6600
Verified signature153e41d -
Training in progress, step 6300
Verified signature6170507 -
Training in progress, step 6000
Verified signatureb2a04ee -
Training in progress, step 5700
Verified signature4306b82 -
Training in progress, step 5400
Verified signature2ccb775 -
Training in progress, step 5100
Verified signaturea286e55 -
Training in progress, step 4800
Verified signaturefaf2053 -
Training in progress, step 4500
Verified signature36266b1 -
Training in progress, step 4200
Verified signature2fea0a9 -
Training in progress, step 3900
Verified signature7f0dff6 -
Training in progress, step 3600
Verified signature8416bfc -
Training in progress, step 3300
Verified signaturec18c16f -
Training in progress, step 3000
Verified signaturea912435 -
Training in progress, step 2700
Verified signatured6fbe39 -
Training in progress, step 2400
Verified signaturea62fe32 -
Training in progress, step 2100
Verified signature22f72c6