Instructions to use OxxoCodes/jamba-small-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OxxoCodes/jamba-small-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OxxoCodes/jamba-small-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OxxoCodes/jamba-small-v1") model = AutoModelForCausalLM.from_pretrained("OxxoCodes/jamba-small-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OxxoCodes/jamba-small-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OxxoCodes/jamba-small-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OxxoCodes/jamba-small-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OxxoCodes/jamba-small-v1
- SGLang
How to use OxxoCodes/jamba-small-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 "OxxoCodes/jamba-small-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": "OxxoCodes/jamba-small-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 "OxxoCodes/jamba-small-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": "OxxoCodes/jamba-small-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OxxoCodes/jamba-small-v1 with Docker Model Runner:
docker model run hf.co/OxxoCodes/jamba-small-v1
Jamba-Small v1
This is a pruned version of AI21 Labs' Jamba-v0.1 model that is ~25% the size of Jamba-v0.1.
Model Details
Whereas Jamba-v0.1 contains 4 Jamba blocks, Jamba-Small contains only 1 Jamba block. Jamba-Small's Jamba blocks follow the same structure seen in Jamba-v0.1, with a 1:7 ratio of attention-to-Mamba layers and MoE applied every 2 layers.
Jamba-Small's weights are initialized from various layers in the original Jamba-v0.1 model. For v1, the layer weights are mapped as follows (left is Jamba-Small layer number, right is Jamba-v0.1 layer number):
0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
6: 30
7: 31
Note that no additional fine-tuning has been performed on this model. As such, its performance is exceptionally poor. This should not be used in production without additional training.
Model Description
- Developed by: Nathan Brown (OxxoCodes)
- Compute provided by: Clemson Palmetto Cluster
- Model type: Joint Attention and Mamba (Jamba)
- Language(s) (NLP): English
- License: Apache 2.0
- Original model: Jamba-v0.1
- Jamba paper: https://arxiv.org/pdf/2403.19887.pdf
- Downloads last month
- 32