Instructions to use manycore-research/SpatialLM-Llama-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use manycore-research/SpatialLM-Llama-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="manycore-research/SpatialLM-Llama-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("manycore-research/SpatialLM-Llama-1B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use manycore-research/SpatialLM-Llama-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "manycore-research/SpatialLM-Llama-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "manycore-research/SpatialLM-Llama-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/manycore-research/SpatialLM-Llama-1B
- SGLang
How to use manycore-research/SpatialLM-Llama-1B 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 "manycore-research/SpatialLM-Llama-1B" \ --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": "manycore-research/SpatialLM-Llama-1B", "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 "manycore-research/SpatialLM-Llama-1B" \ --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": "manycore-research/SpatialLM-Llama-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use manycore-research/SpatialLM-Llama-1B with Docker Model Runner:
docker model run hf.co/manycore-research/SpatialLM-Llama-1B
Local Installation Video and Testing - Step by Step
Hi,
Kudos on producing such a sublime model. I did a local installation and testing video :
https://youtu.be/dy20K-6Pt4U?si=BZdp5RaofMpNI2Lj
Thanks and regards,
Fahd
Hi
I wanted to test Qwen version on my old 1080 NVidia GPU with 8 GB is that at all possible?
Also I followed the instructions to the letter.
But having trouble installing was nvidia-nccl-cu12. It says it can't be found. Tried a lot of different suggestions to fix that. Can this one be skipped? , how. Or found?
"NCCL stands for NVIDIA Collective Communications Library, which is primarily used for multi-GPU communications.
NCCL is a library that enables efficient communication (message passing) between multiple GPUs, both within and across multiple nodes. It's particularly important for distributed deep learning training across multiple GPUs.
The "cu12" part in the name indicates it's for CUDA 12.x compatibility."