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