Text Generation
Transformers
TensorBoard
Safetensors
English
gpt2
Generated from Trainer
code
text-generation-inference
Instructions to use Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca") model = AutoModelForCausalLM.from_pretrained("Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca
- SGLang
How to use Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca 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 "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca" \ --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": "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca", "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 "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca" \ --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": "Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca with Docker Model Runner:
docker model run hf.co/Vishaltiwari2019/distilgpt2-finetuned-python_code_instructions_18k_alpaca
Commit History
-
Update README.md
Verified signatureb184319 -
Update README.md
Verified signature893b190 -
Update README.md
Verified signatureb98e29a -
Update README.md
Verified signature187ddd9 -
Update README.md
Verified signatured7f7e9e
-
Update README.md
Verified signature5fd13ca -
Upload 2 files
Verified signature8dbc96c -
End of training
Verified signature6d72bc6 -
Training in progress, step 11500
Verified signaturee654d07 -
Training in progress, step 11000
Verified signaturea765c17 -
Training in progress, step 10500
Verified signature5c37b5a -
Training in progress, step 10000
Verified signature67b4ea1 -
Training in progress, step 9500
Verified signature3e25925 -
Training in progress, step 9000
Verified signaturec512e69 -
Training in progress, step 8500
Verified signature9b16f8e -
Training in progress, step 8000
Verified signatured1203fe -
Training in progress, step 7500
Verified signature2a63725 -
Training in progress, step 7000
Verified signature2a53e93 -
Training in progress, step 6500
Verified signatureebdf5f3 -
Training in progress, step 6000
Verified signature6f4789f -
Training in progress, step 5500
Verified signaturef601624 -
Training in progress, step 4500
Verified signature0d50605 -
Training in progress, step 4000
Verified signature2d84ade -
Training in progress, step 3500
Verified signature3a02684 -
Training in progress, step 3000
Verified signature116759d -
Training in progress, step 2500
Verified signature79013b1 -
Training in progress, step 2000
Verified signature4063f4d -
Training in progress, step 1500
Verified signature7952e59 -
Training in progress, step 1000
Verified signature608806f -
Training in progress, step 500
Verified signature637e072 -
initial commit
Verified signature335bb60