Instructions to use NasimB/gpt2-concat-second with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/gpt2-concat-second with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/gpt2-concat-second")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/gpt2-concat-second") model = AutoModelForCausalLM.from_pretrained("NasimB/gpt2-concat-second", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NasimB/gpt2-concat-second with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/gpt2-concat-second" # 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-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/gpt2-concat-second
- SGLang
How to use NasimB/gpt2-concat-second 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-concat-second" \ --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-concat-second", "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-concat-second" \ --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-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/gpt2-concat-second with Docker Model Runner:
docker model run hf.co/NasimB/gpt2-concat-second
Commit History
-
update model card README.md
fed2e05 -
End of training
d4eedf4 -
Training in progress, step 17000
c2c8cbb -
Training in progress, step 16500
9c22a88 -
Training in progress, step 16000
5e7b9d3 -
Training in progress, step 15500
2541765 -
Training in progress, step 15000
5bb4731 -
Training in progress, step 14500
a0e2976 -
Training in progress, step 14000
e2be30d -
Training in progress, step 13500
2dbee82 -
Training in progress, step 13000
e422dca -
Training in progress, step 12500
5f9640d -
Training in progress, step 12000
6495d30 -
Training in progress, step 11500
c40c7dc
-
Training in progress, step 11000
6d8bb67 -
Training in progress, step 10500
bb5b3b9 -
Training in progress, step 10000
e2b8b51 -
Training in progress, step 9500
23894e3 -
Training in progress, step 9000
9beb71e -
Training in progress, step 8500
d0f6690 -
Training in progress, step 8000
ca19478 -
Training in progress, step 7500
9bbdbd1 -
Training in progress, step 7000
9a2fe24 -
Training in progress, step 6500
8dfcc61 -
Training in progress, step 6000
c7f8474 -
Training in progress, step 5500
90991c8 -
Training in progress, step 5000
e6fb416 -
Training in progress, step 4500
7070093 -
Training in progress, step 4000
f847e5b -
Training in progress, step 3500
69ec197 -
Training in progress, step 3000
42bb83e -
Training in progress, step 2500
7f5b655 -
Training in progress, step 2000
fd49f8d -
Training in progress, step 1500
6a55d82 -
Training in progress, step 1000
ddf9460 -
Training in progress, step 500
2adcc92
-
Training in progress, step 2000
c97583e -
Training in progress, step 1500
1b06c32 -
Training in progress, step 1000
2bf45b0 -
Training in progress, step 500
dc9cee1 -
update model card README.md
eca14f9 -
End of training
ae1d029 -
Training in progress, step 17000
33b4d5e -
Training in progress, step 16500
da24505 -
Training in progress, step 16000
c5a94db -
Training in progress, step 15500
96febfd -
Training in progress, step 15000
109c194 -
Training in progress, step 14500
dcdfc41 -
Training in progress, step 14000
e35b2a8 -
Training in progress, step 13500
71c6510