Instructions to use ai21labs/Jamba-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ai21labs/Jamba-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ai21labs/Jamba-v0.1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ai21labs/Jamba-v0.1", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ai21labs/Jamba-v0.1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ai21labs/Jamba-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ai21labs/Jamba-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ai21labs/Jamba-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ai21labs/Jamba-v0.1
- SGLang
How to use ai21labs/Jamba-v0.1 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 "ai21labs/Jamba-v0.1" \ --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": "ai21labs/Jamba-v0.1", "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 "ai21labs/Jamba-v0.1" \ --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": "ai21labs/Jamba-v0.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ai21labs/Jamba-v0.1 with Docker Model Runner:
docker model run hf.co/ai21labs/Jamba-v0.1
Commit History
-
Update README.md
Verified signature9efd115
-
Update LoRA fine-tune example - more target_modules, lower LR, bf16 (#49)
Verified signature- Update LoRA fine-tune example - more target_modules, lower LR, bf16 (a69ca0f303d6079e51f4d323a81e2ec76484fc92) Co-authored-by: Michael Gokhman <michael-go@users.noreply.huggingface.co>c16867f
-
Move to in-library checkpoint (#43)
Verified signature- Move to in-library checkpoint (886484abd64073e42c2145031d4b1108411b5538) - Move to in-library checkpoint (e00e26a40027807e70ef1e0d10ad85dcc2ba5bbe) - Move to in-library checkpoint (5da3542292b50719512b7c22f6f9f8cff69c8bb7) - Move to in-library checkpoint (5a0154d86a53a3ea6c4f115ab66be55ef5d344e8)ce13f3f
-
Update README.md
Verified signature8ee14c3
-
Fix small typo in JambaDecoder (#24)
Verified signature- Fix small typo in JambaDecoder (3e2e3bf1a6540e78b3d6e8f58adbbab384d6d32d) Co-authored-by: Moshe Berchansky <mber@users.noreply.huggingface.co>86c5df0
-
Update README.md
Verified signature62df05e -
Update README.md
Verified signature37a7297
-
Remove TGI tag (#8)
Verified signature- Remove TGI tag (75e2c18c8ab5999a7287e4c5f6458d3525a4331b) Co-authored-by: Omar Sanseviero <osanseviero@users.noreply.huggingface.co>a5b97ac -
Update modeling_jamba.py - LoRA support in Mamba (#6)
Verified signature- Update modeling_jamba.py - LoRA support in Mamba (409c904957803838229e49676ec3958c2205783d)512e755 -
Update README.md
Verified signatureca4e687 -
Update README.md
Verified signature4116eee -
Update README.md
Verified signaturea6b0673 -
Update README.md
Verified signaturea7db71f -
upload model
Verified signature905f68a -
initial commit
Verified signature0776c31