Instructions to use d-matrix/gpt-j-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d-matrix/gpt-j-6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="d-matrix/gpt-j-6b", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("d-matrix/gpt-j-6b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("d-matrix/gpt-j-6b", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use d-matrix/gpt-j-6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "d-matrix/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": "d-matrix/gpt-j-6b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/d-matrix/gpt-j-6b
- SGLang
How to use d-matrix/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 "d-matrix/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": "d-matrix/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 "d-matrix/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": "d-matrix/gpt-j-6b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use d-matrix/gpt-j-6b with Docker Model Runner:
docker model run hf.co/d-matrix/gpt-j-6b
Commit History
Upload README.md with huggingface_hub 454e3d6 verified
Upload README.md with huggingface_hub 226d3f4 verified
Upload README.md with huggingface_hub b171441 verified
Upload README.md with huggingface_hub f2bf3e7 verified
Upload README.md with huggingface_hub 9d85a7d verified
Upload README.md with huggingface_hub 64d2f8e verified
Delete README.md c6181fc verified
Update modeling_gptj.py 7e41789 verified
d-Matrix commited on
Update modeling_gptj.py 036923e verified
d-Matrix commited on
Update modeling_gptj.py dfd01dd verified
d-Matrix commited on
Delete test.py 61e212c verified
d-Matrix commited on
Update modeling_gptj.py 37c7c7e verified
d-Matrix commited on
Update README.md 67938d7 verified
d-matrix commited on
Update README.md 6302b7f verified
d-matrix commited on
Update README.md 4245d7a verified
d-matrix commited on
Update config.json 7305130 verified
d-matrix commited on
WIP c1efd44
“sayehs” commited on
modified readme 94a9749
“sayehs” commited on
custom modeling of gpt-j-6b 6a8a059
“sayehs” commited on
Copied filed from gpt-j-6b repo 791b61d
“sayehs” commited on
initial commit 64eff2e verified
d-matrix commited on