Instructions to use MBZUAI-LLM/SlimPajama-DC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MBZUAI-LLM/SlimPajama-DC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MBZUAI-LLM/SlimPajama-DC", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MBZUAI-LLM/SlimPajama-DC", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MBZUAI-LLM/SlimPajama-DC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MBZUAI-LLM/SlimPajama-DC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MBZUAI-LLM/SlimPajama-DC", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MBZUAI-LLM/SlimPajama-DC
- SGLang
How to use MBZUAI-LLM/SlimPajama-DC 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-LLM/SlimPajama-DC" \ --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-LLM/SlimPajama-DC", "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-LLM/SlimPajama-DC" \ --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-LLM/SlimPajama-DC", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MBZUAI-LLM/SlimPajama-DC with Docker Model Runner:
docker model run hf.co/MBZUAI-LLM/SlimPajama-DC
Commit History
-
Update README.md
Verified signature25bec7f
-
Update README.md
Verified signature213ec81 -
Update README.md
Verified signatureb38238b -
Delete SlimPajama-DC.png
Verified signatureef371e8 -
Upload 4 files
Verified signatureb64c608
-
Upload SlimPajama-DC.png
Verified signaturedaa908e
-
Delete __pycache__
Verified signature59636c0 -
Upload folder using huggingface_hub
Verified signature89f7e70
-
Update config.json
Verified signatureced2d75 -
Update config.json
Verified signature56ff6ea -
Update modeling_btlm.py
Verified signature579c912
-
Upload folder using huggingface_hub
Verified signature377c487 -
Upload folder using huggingface_hub
Verified signature0fe8600 -
Upload folder using huggingface_hub
Verified signature3d2b128 -
Upload folder using huggingface_hub
Verified signatureb02c73e -
initial commit
Verified signature2f33f25