Instructions to use inclusionAI/Ring-mini-sparse-2.0-exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/Ring-mini-sparse-2.0-exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="inclusionAI/Ring-mini-sparse-2.0-exp", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("inclusionAI/Ring-mini-sparse-2.0-exp", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use inclusionAI/Ring-mini-sparse-2.0-exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inclusionAI/Ring-mini-sparse-2.0-exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/Ring-mini-sparse-2.0-exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/inclusionAI/Ring-mini-sparse-2.0-exp
- SGLang
How to use inclusionAI/Ring-mini-sparse-2.0-exp 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 "inclusionAI/Ring-mini-sparse-2.0-exp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/Ring-mini-sparse-2.0-exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "inclusionAI/Ring-mini-sparse-2.0-exp" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/Ring-mini-sparse-2.0-exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use inclusionAI/Ring-mini-sparse-2.0-exp with Docker Model Runner:
docker model run hf.co/inclusionAI/Ring-mini-sparse-2.0-exp
Failed to install SGLang
when I followed the installation guide for SGLang, I ran into the following errors.
pip install sglang==0.5.3 sgl-kernel==0.3.15 torch==2.8.0 torchvision==0.23.0 torchao
ERROR: Cannot install sgl-kernel==0.3.15 and sglang==0.5.3 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested sgl-kernel==0.3.15
sglang 0.5.3 depends on sgl-kernel==0.3.14.post1
Additionally, some packages in these conflicts have no matching distributions available for your environment:
sgl-kernel
To fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
when I followed the installation guide for SGLang, I ran into the following errors.
pip install sglang==0.5.3 sgl-kernel==0.3.15 torch==2.8.0 torchvision==0.23.0 torchao
ERROR: Cannot install sgl-kernel==0.3.15 and sglang==0.5.3 because these package versions have conflicting dependencies.The conflict is caused by:
The user requested sgl-kernel==0.3.15
sglang 0.5.3 depends on sgl-kernel==0.3.14.post1Additionally, some packages in these conflicts have no matching distributions available for your environment:
sgl-kernelTo fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
In my environment, the versions are sglang==0.5.3rc0 and sgl-kernel==0.3.15.