Instructions to use hivemind/gpt-j-6B-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hivemind/gpt-j-6B-8bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hivemind/gpt-j-6B-8bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hivemind/gpt-j-6B-8bit") model = AutoModelForCausalLM.from_pretrained("hivemind/gpt-j-6B-8bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hivemind/gpt-j-6B-8bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hivemind/gpt-j-6B-8bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hivemind/gpt-j-6B-8bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hivemind/gpt-j-6B-8bit
- SGLang
How to use hivemind/gpt-j-6B-8bit 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 "hivemind/gpt-j-6B-8bit" \ --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": "hivemind/gpt-j-6B-8bit", "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 "hivemind/gpt-j-6B-8bit" \ --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": "hivemind/gpt-j-6B-8bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hivemind/gpt-j-6B-8bit with Docker Model Runner:
docker model run hf.co/hivemind/gpt-j-6B-8bit
When will the error get resolved ?Can't load tokenizer using from_pretrained, please update its configuration
Can't load tokenizer using from_pretrained, please update its configuration: Can't load tokenizer for 'hivemind/gpt-j-6B-8bit'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'hivemind/gpt-j-6B-8bit' is the correct path to a directory containing all relevant files for a GPT2TokenizerFast tokenizer.
Have a look team , and do the needful earliest possible
Please load the tokenizer from EleutherAI/gpt-j-6B, as it is identical.
This code was superceded by the [load_in_8bit=True feature in transformers]https://github.com/huggingface/transformers/pull/17901)
by Younes Belkada and Tim Dettmers. Please see this usage example.
This legacy model was built for transformers v4.15.0 and pytorch 1.11. Newer versions could work, but are not supported.