Instructions to use NasimB/gpt2-dp-mod-datasets with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/gpt2-dp-mod-datasets with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/gpt2-dp-mod-datasets")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/gpt2-dp-mod-datasets") model = AutoModelForCausalLM.from_pretrained("NasimB/gpt2-dp-mod-datasets", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/gpt2-dp-mod-datasets with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/gpt2-dp-mod-datasets" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NasimB/gpt2-dp-mod-datasets", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/gpt2-dp-mod-datasets
- SGLang
How to use NasimB/gpt2-dp-mod-datasets 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 "NasimB/gpt2-dp-mod-datasets" \ --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": "NasimB/gpt2-dp-mod-datasets", "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 "NasimB/gpt2-dp-mod-datasets" \ --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": "NasimB/gpt2-dp-mod-datasets", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/gpt2-dp-mod-datasets with Docker Model Runner:
docker model run hf.co/NasimB/gpt2-dp-mod-datasets
Commit History
-
update model card README.md
9c2cba3 -
End of training
33b458a -
Training in progress, step 10500
f3c47be -
Training in progress, step 10000
bba8d4b -
Training in progress, step 9500
596d60c -
Training in progress, step 9000
c7357cb -
Training in progress, step 8500
351e151 -
Training in progress, step 8000
c0ad46b -
Training in progress, step 7500
2a3a535 -
Training in progress, step 7000
c06e83a -
Training in progress, step 6500
8639189 -
Training in progress, step 6000
f578cc7 -
Training in progress, step 5500
87cd1ed -
Training in progress, step 5000
7587724 -
Training in progress, step 4500
e13873f -
Training in progress, step 4000
8411eff -
Training in progress, step 3500
0acd198 -
Training in progress, step 3000
cd3c6cf -
Training in progress, step 2500
bcef4c7 -
Training in progress, step 2000
7ba2a18 -
Training in progress, step 1500
cf6a943 -
Training in progress, step 1000
7250f56 -
Training in progress, step 500
2e63b2e -
initial commit
2065289