Instructions to use ibm-ai-platform/Bamba-9B-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ibm-ai-platform/Bamba-9B-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ibm-ai-platform/Bamba-9B-v1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ibm-ai-platform/Bamba-9B-v1") model = AutoModelForCausalLM.from_pretrained("ibm-ai-platform/Bamba-9B-v1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ibm-ai-platform/Bamba-9B-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ibm-ai-platform/Bamba-9B-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ibm-ai-platform/Bamba-9B-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ibm-ai-platform/Bamba-9B-v1
- SGLang
How to use ibm-ai-platform/Bamba-9B-v1 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 "ibm-ai-platform/Bamba-9B-v1" \ --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": "ibm-ai-platform/Bamba-9B-v1", "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 "ibm-ai-platform/Bamba-9B-v1" \ --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": "ibm-ai-platform/Bamba-9B-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ibm-ai-platform/Bamba-9B-v1 with Docker Model Runner:
docker model run hf.co/ibm-ai-platform/Bamba-9B-v1
Commit History
-
adding context length var to config.json, this is the same var used in bamaba v2 9b (#6)
Verified signature- adding context length var to config.json, this is the same var used in bamaba v2 9b (dc98421992c73dfee5ac7a9583c70fe7aad957e6) Co-authored-by: Ryan Mangeno <anakin004@users.noreply.huggingface.co>50ec876
-
Update README.md
Verified signaturecfc26fe -
Update README.md
Verified signaturee6ea002
-
Update README.md
Verified signature0cbf233
-
Tokenizer files
Verified signature6292e59 -
Delete tokenizer_config.json
Verified signature9360052 -
Delete tokenizer.json
Verified signature49844a2 -
Delete special_tokens_map.json
Verified signature33d1033 -
Updated tokenizer files
Verified signatureec33c52 -
Delete tokenizer_config.json
Verified signaturecf822cf -
Delete tokenizer.json
Verified signaturea9ba24d -
Delete special_tokens_map.json
Verified signaturefba1bb7
-
update model card tags (#2)
Verified signature- update model card tags (92430f338fbe7137543ce45879f3726eb44360ff) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>019d8d2
-
Update README.md
Verified signature43f2151 -
Update README.md
Verified signaturef8b2ef2 -
Update README.md
Verified signature612539a -
Update README.md
Verified signature987642a -
Update README.md
Verified signature0198d34 -
Update README.md
Verified signatureca1cc08
-
GGUF (#1)
Verified signature- Add gguf and track with lfs (960a3a26033b3f3f035f0c0e7d4e6a311b944116) Co-authored-by: Gabe Goodhart <gabegoodhart@users.noreply.huggingface.co>0192254
-
tokenizer files
Verified signatured5f0d5c -
Weights upload
2fb00d0 -
initial commit
Verified signature015c3ba