Text Generation
Transformers
Safetensors
English
sky-crest
0labs
sky
crest
adaptive-depth
llm
lightweight
edge-ai
conversational
custom_code
Instructions to use 0labs-in/Sky-v2.0-Lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0labs-in/Sky-v2.0-Lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="0labs-in/Sky-v2.0-Lite", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("0labs-in/Sky-v2.0-Lite", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 0labs-in/Sky-v2.0-Lite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0labs-in/Sky-v2.0-Lite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0labs-in/Sky-v2.0-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/0labs-in/Sky-v2.0-Lite
- SGLang
How to use 0labs-in/Sky-v2.0-Lite 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 "0labs-in/Sky-v2.0-Lite" \ --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": "0labs-in/Sky-v2.0-Lite", "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 "0labs-in/Sky-v2.0-Lite" \ --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": "0labs-in/Sky-v2.0-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 0labs-in/Sky-v2.0-Lite with Docker Model Runner:
docker model run hf.co/0labs-in/Sky-v2.0-Lite
| """ | |
| Sky CREST Model — 0labs | |
| SkyCRESTForCausalLM: Adaptive-depth language model architecture. | |
| """ | |
| import torch | |
| import torch.nn as nn | |
| import transformers | |
| from .configuration_sky_crest import SkyCRESTConfig | |
| from .crest_block import CRESTBlock | |
| # Dynamically resolve base architecture | |
| _BASE_CLASSES = [ | |
| "Qwen3_5ForCausalLM", | |
| "Qwen2ForCausalLM", | |
| "LlamaForCausalLM", | |
| ] | |
| _BaseClass = None | |
| for _name in _BASE_CLASSES: | |
| _BaseClass = getattr(transformers, _name, None) | |
| if _BaseClass is not None: | |
| break | |
| if _BaseClass is None: | |
| raise ImportError( | |
| "Sky v2.0 requires transformers>=4.51.0. " | |
| "Run: pip install --upgrade transformers" | |
| ) | |
| class SkyCRESTForCausalLM(_BaseClass): | |
| """Sky v2.0 — Adaptive-depth language model with CREST architecture by 0labs.""" | |
| config_class = SkyCRESTConfig | |
| def __init__(self, config): | |
| super().__init__(config) | |
| max_steps = getattr(config, "crest_max_steps", 4) | |
| hidden_size = config.hidden_size | |
| # Find the layers — handle both model.layers and model.language_model.layers | |
| if hasattr(self.model, "language_model"): | |
| layers = self.model.language_model.layers | |
| else: | |
| layers = self.model.layers | |
| for layer in layers: | |
| orig_mlp = layer.mlp | |
| layer.mlp = CRESTBlock(orig_mlp, hidden_size=hidden_size, max_steps=max_steps) | |