Instructions to use NBRZ/gpt2-concat-second with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NBRZ/gpt2-concat-second with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NBRZ/gpt2-concat-second")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NBRZ/gpt2-concat-second") model = AutoModelForCausalLM.from_pretrained("NBRZ/gpt2-concat-second", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NBRZ/gpt2-concat-second with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NBRZ/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": "NBRZ/gpt2-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NBRZ/gpt2-concat-second
- SGLang
How to use NBRZ/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 "NBRZ/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": "NBRZ/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 "NBRZ/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": "NBRZ/gpt2-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NBRZ/gpt2-concat-second with Docker Model Runner:
docker model run hf.co/NBRZ/gpt2-concat-second
Commit History
-
Training in progress, step 17000
53a08f2 -
Training in progress, step 16500
c16a9c9 -
Training in progress, step 16000
a7b55c8 -
Training in progress, step 15500
a824438 -
Training in progress, step 15000
ad7972d -
Training in progress, step 14500
0d38557 -
Training in progress, step 14000
d2e3b4b -
Training in progress, step 13500
48a9760 -
Training in progress, step 13000
579b280 -
Training in progress, step 12500
6c5e9e0 -
Training in progress, step 12000
d2ff591 -
Training in progress, step 11500
6e40487 -
Training in progress, step 11000
1550c7e -
Training in progress, step 10500
7dc9619 -
Training in progress, step 10000
f469ee4 -
Training in progress, step 9500
9d64abf -
Training in progress, step 9000
b12744e -
Training in progress, step 8500
1d8ff89 -
Training in progress, step 8000
d739145 -
Training in progress, step 7500
c4387ff -
Training in progress, step 7000
43bc913 -
Training in progress, step 6500
9c9d317 -
Training in progress, step 6000
32453af -
Training in progress, step 5500
50464ef -
Training in progress, step 5000
be0fb7a -
Training in progress, step 4500
a18558a -
Training in progress, step 4000
be94e05 -
Training in progress, step 3500
d833829 -
Training in progress, step 3000
562405e -
Training in progress, step 2500
9b08b96 -
Training in progress, step 2000
9fea584 -
Training in progress, step 1500
e97a3f3 -
Training in progress, step 1000
ad7ea53 -
Training in progress, step 500
ba01f7f -
initial commit
1f04f08