Instructions to use bertin-project/bertin-gpt-j-6B-alpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bertin-project/bertin-gpt-j-6B-alpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bertin-project/bertin-gpt-j-6B-alpaca")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bertin-project/bertin-gpt-j-6B-alpaca") model = AutoModelForCausalLM.from_pretrained("bertin-project/bertin-gpt-j-6B-alpaca", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bertin-project/bertin-gpt-j-6B-alpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bertin-project/bertin-gpt-j-6B-alpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bertin-project/bertin-gpt-j-6B-alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bertin-project/bertin-gpt-j-6B-alpaca
- SGLang
How to use bertin-project/bertin-gpt-j-6B-alpaca 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 "bertin-project/bertin-gpt-j-6B-alpaca" \ --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": "bertin-project/bertin-gpt-j-6B-alpaca", "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 "bertin-project/bertin-gpt-j-6B-alpaca" \ --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": "bertin-project/bertin-gpt-j-6B-alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bertin-project/bertin-gpt-j-6B-alpaca with Docker Model Runner:
docker model run hf.co/bertin-project/bertin-gpt-j-6B-alpaca
Download model-00005-of-00005.safetensors from bertin-project/bertin-gpt-j-6B-alpaca: direct link, hf CLI and curl.
- Browser
- Download file 4.6 GB
-
https://huggingface.co/bertin-project/bertin-gpt-j-6B-alpaca/resolve/main/model-00005-of-00005.safetensors
- Command line
-
hf download hf://bertin-project/bertin-gpt-j-6B-alpaca/model-00005-of-00005.safetensors
-
curl -L -o model-00005-of-00005.safetensors https://huggingface.co/bertin-project/bertin-gpt-j-6B-alpaca/resolve/main/model-00005-of-00005.safetensors
4.6 GB
- Xet hash:
- 94902229a4ca559a155eca0eeef575c247d9c6c8811e8b1236bbfc694c6824e3
- Size of remote file:
- 4.6 GB
- SHA256:
- f0860041c5f391064e104109642880aaadd11c5baebf21719d4df1c7bc5f75a4
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.