Instructions to use nlpcloud/instruct-gpt-j-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nlpcloud/instruct-gpt-j-fp16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nlpcloud/instruct-gpt-j-fp16")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nlpcloud/instruct-gpt-j-fp16") model = AutoModelForCausalLM.from_pretrained("nlpcloud/instruct-gpt-j-fp16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nlpcloud/instruct-gpt-j-fp16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nlpcloud/instruct-gpt-j-fp16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nlpcloud/instruct-gpt-j-fp16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nlpcloud/instruct-gpt-j-fp16
- SGLang
How to use nlpcloud/instruct-gpt-j-fp16 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 "nlpcloud/instruct-gpt-j-fp16" \ --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": "nlpcloud/instruct-gpt-j-fp16", "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 "nlpcloud/instruct-gpt-j-fp16" \ --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": "nlpcloud/instruct-gpt-j-fp16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nlpcloud/instruct-gpt-j-fp16 with Docker Model Runner:
docker model run hf.co/nlpcloud/instruct-gpt-j-fp16
Commit History
-
Update README.md
8533edd -
Update README.md
d232e29 -
Update README.md
51f2116 -
Update README.md
ac7834d -
Update README.md
96966e4 -
Update README.md
1ec8ba9 -
Update README.md
cf9d94b -
Update README.md
f303ddf -
Update README.md
2cc7a94 -
Update README.md
8bdd61d -
Upload merges.txt with huggingface_hub
47b2a8b -
Upload tokenizer_config.json with huggingface_hub
19203d2 -
Upload tokenizer.json with huggingface_hub
a40f333 -
Upload added_tokens.json with huggingface_hub
ccab1f9 -
Upload added_tokens.json with huggingface_hub
36b24f3 -
Upload added_tokens.json with huggingface_hub
7f420fd -
Upload vocab.json with huggingface_hub
83c4c29 -
Upload pytorch_model.bin with huggingface_hub
18906b8 -
Upload config.json with huggingface_hub
f57445f -
Delete model.pt
cde480b -
Upload pytorch_model.bin with huggingface_hub
bed5258 -
Upload model.pt with huggingface_hub
2e0ff1a -
Upload config.json with huggingface_hub
b1e32c3 -
initial commit
fe34c55