Instructions to use allenai/Bolmo-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/Bolmo-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="allenai/Bolmo-7B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("allenai/Bolmo-7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use allenai/Bolmo-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/Bolmo-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/Bolmo-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/allenai/Bolmo-7B
- SGLang
How to use allenai/Bolmo-7B 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 "allenai/Bolmo-7B" \ --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": "allenai/Bolmo-7B", "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 "allenai/Bolmo-7B" \ --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": "allenai/Bolmo-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use allenai/Bolmo-7B with Docker Model Runner:
docker model run hf.co/allenai/Bolmo-7B
Commit History
18 days ago
-
Re-export with updated config and tokenizer (#2)
- Re-export with updated config and tokenizer (08887d29279bdb667f3bbac26018101a937b348c) - Update README.md (b92b60f41f8d01a7772efd521478648057b46f83) - Update modeling_bolmo.py (a9b66b16568230b99f3dae8f092c51c170339246) Co-authored-by: Benjamin Minixhofer <benjamin@users.noreply.huggingface.co>11586e0
-
CPU support, stop criteria fix for bs>1
Verified signature73fa654
-
Update README.md
Verified signature2b30759 -
Update README.md
Verified signature1c90d5a
-
Update config.json
Verified signature2d3a087 -
Update README.md
Verified signature531f9a7
-
Upload folder using huggingface_hub
Verified signature5b2811e -
Update README.md
Verified signature1ff0ce4 -
Create README.md
Verified signature3eb1093 -
Upload folder using huggingface_hub
Verified signature8b28006 -
initial commit
Verified signature2644196