Instructions to use MBZUAI/MobiLlama-05B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI/MobiLlama-05B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MBZUAI/MobiLlama-05B-Chat", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MBZUAI/MobiLlama-05B-Chat", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("MBZUAI/MobiLlama-05B-Chat", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MBZUAI/MobiLlama-05B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MBZUAI/MobiLlama-05B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MBZUAI/MobiLlama-05B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MBZUAI/MobiLlama-05B-Chat
- SGLang
How to use MBZUAI/MobiLlama-05B-Chat 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 "MBZUAI/MobiLlama-05B-Chat" \ --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": "MBZUAI/MobiLlama-05B-Chat", "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 "MBZUAI/MobiLlama-05B-Chat" \ --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": "MBZUAI/MobiLlama-05B-Chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MBZUAI/MobiLlama-05B-Chat with Docker Model Runner:
docker model run hf.co/MBZUAI/MobiLlama-05B-Chat
Update README.md
Browse files
README.md
CHANGED
|
@@ -73,17 +73,17 @@ python3 -m fastchat.serve.cli --model-path MBZUAI/MobiLlama-05B-Chat
|
|
| 73 |
|
| 74 |
|
| 75 |
## Evaluation
|
| 76 |
-
| Evaluation Benchmark | MobiLlama-
|
| 77 |
| ----------- | ----------- | ----------- |
|
| 78 |
-
| HellaSwag | 0.
|
| 79 |
-
| MMLU | 0.
|
| 80 |
-
| Arc Challenge | 0.
|
| 81 |
-
| TruthfulQA | 0.
|
| 82 |
-
| CrowsPairs | 0.
|
| 83 |
-
| PIQA | 0.
|
| 84 |
-
| Race | 0.
|
| 85 |
-
| SIQA | 0.
|
| 86 |
-
| Winogrande | 0.
|
| 87 |
|
| 88 |
|
| 89 |
## Intended Uses
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
## Evaluation
|
| 76 |
+
| Evaluation Benchmark | MobiLlama-0.5B | MobiLlama-0.8B | MobiLlama-1.2B |
|
| 77 |
| ----------- | ----------- | ----------- |
|
| 78 |
+
| HellaSwag | 0.5252 | 0.5409 | 0.6299 |
|
| 79 |
+
| MMLU | 0.2645 | 0.2692 | 0.2423 |
|
| 80 |
+
| Arc Challenge | 0.2952 | 0.3020 | 0.3455 |
|
| 81 |
+
| TruthfulQA | 0.3805 | 0.3848 | 0.3557 |
|
| 82 |
+
| CrowsPairs | 0.6403 | 0.6482 | 0.6812 |
|
| 83 |
+
| PIQA | 0.7203 | 0.7317 | 0.7529 |
|
| 84 |
+
| Race | 0.3368 | 0.3337 | 0.3531 |
|
| 85 |
+
| SIQA | 0.4022 | 0.4160 | 0.4196 |
|
| 86 |
+
| Winogrande | 0.5753 | 0.5745 | 0.6108 |
|
| 87 |
|
| 88 |
|
| 89 |
## Intended Uses
|