Instructions to use EleutherAI/gpt-j-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/gpt-j-6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/gpt-j-6b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-j-6b") model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-j-6b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use EleutherAI/gpt-j-6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/gpt-j-6b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EleutherAI/gpt-j-6b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/gpt-j-6b
- SGLang
How to use EleutherAI/gpt-j-6b 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 "EleutherAI/gpt-j-6b" \ --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": "EleutherAI/gpt-j-6b", "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 "EleutherAI/gpt-j-6b" \ --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": "EleutherAI/gpt-j-6b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/gpt-j-6b with Docker Model Runner:
docker model run hf.co/EleutherAI/gpt-j-6b
Install & run EleutherAI/gpt-j-6b easily using llmpm
#50 opened 2 months ago
by
sarthak-saxena
Create app
#48 opened 12 months ago
by
hoomanshirtavani
I know that vocab size and embeddings size are different
#46 opened over 1 year ago
by
zhangsanshi
Upload IMG-20240702-WA0000.jpg
😔 1
#45 opened over 1 year ago
by
Sal2012340
Request: DOI
#43 opened over 1 year ago
by
Yahwe77
gpt-j for thread detectioon
#41 opened about 2 years ago
by
juli35
Adding `safetensors` variant of this model
#40 opened about 2 years ago
by
SFconvertbot
[AUTOMATED] Model Memory Requirements
#39 opened about 2 years ago
by
model-sizer-bot
Adding Evaluation Results
#38 opened over 2 years ago
by
leaderboard-pr-bot
Best Way to Load a Model After Training w/o Requantizing
2
#37 opened over 2 years ago
by
avstinpaxton
Update README.md
#36 opened over 2 years ago
by
chimdiya
Error import transformers.models.gptj_modelling-gptj
#35 opened almost 3 years ago
by
TricksterX1337
text to sql
#34 opened almost 3 years ago
by
prateeti
GPTJForCausalLM LM head weights not initialized?
#33 opened almost 3 years ago
by
0xnurl
How to get Sentence embeddings?
#32 opened almost 3 years ago
by deleted
Whats the difference between GPT-J and Pythia?
👍 2
#31 opened almost 3 years ago
by
lamwilton
Deployment and infrastructure requirement for GPT-J
#29 opened almost 3 years ago
by
rajib76
file input format
#27 opened about 3 years ago
by
Munishsingh
ValueError: Attempting to unscale FP16 gradients.
#26 opened about 3 years ago
by
hsuyab
Tokenizer for GPT-J-6B fails when trying to fine-tune for GLUE tasks
#24 opened about 3 years ago
by
Jojimon
Tokenizer loading issue
5
#23 opened about 3 years ago
by
Tanishq3232
Is there a float16 version?
2
#20 opened about 3 years ago
by
PaulTheHuman
RuntimeError: expected scalar type Half but found Float
1
#19 opened about 3 years ago
by
moshi
Can this model be used for the Generative Question Answering?
👍❤️ 4
1
#18 opened about 3 years ago
by
AayushShah
Update config.json
#17 opened about 3 years ago
by
Sabareeshr
How do you download the whole pack of files?
3
#16 opened about 3 years ago
by
Maslenok
How to fine tune or train with our own data?
3
#15 opened over 3 years ago
by
ram77gowri
How can we add ability remember the conversation ??
1
#14 opened over 3 years ago
by
MukeshSharma
Telegram Info Bot
3
#13 opened over 3 years ago
by
tushar310
GPTJForCausalLM hogs memory - inference only
👍 1
2
#9 opened over 3 years ago
by
mrmartin