Text Generation
Transformers
Safetensors
English
code
helion-osc
mathematics
reasoning
algorithm
causal-lm
conversational
bitsandbytes
Instructions to use DeepXR/Helion-OSC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DeepXR/Helion-OSC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DeepXR/Helion-OSC") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("DeepXR/Helion-OSC", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DeepXR/Helion-OSC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DeepXR/Helion-OSC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DeepXR/Helion-OSC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DeepXR/Helion-OSC
- SGLang
How to use DeepXR/Helion-OSC 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 "DeepXR/Helion-OSC" \ --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": "DeepXR/Helion-OSC", "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 "DeepXR/Helion-OSC" \ --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": "DeepXR/Helion-OSC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use DeepXR/Helion-OSC with Docker Model Runner:
docker model run hf.co/DeepXR/Helion-OSC
Update inference/generate_shards.py
Browse files
inference/generate_shards.py
CHANGED
|
@@ -47,7 +47,7 @@ class ShardGenerator:
|
|
| 47 |
|
| 48 |
def generate_placeholder_shards(
|
| 49 |
self,
|
| 50 |
-
shard_size_mb: float =
|
| 51 |
tensor_dtype: torch.dtype = torch.bfloat16
|
| 52 |
):
|
| 53 |
"""
|
|
@@ -122,7 +122,7 @@ class ShardGenerator:
|
|
| 122 |
def split_large_model(
|
| 123 |
self,
|
| 124 |
model_state_dict: Dict[str, torch.Tensor],
|
| 125 |
-
max_shard_size_gb: float =
|
| 126 |
):
|
| 127 |
"""
|
| 128 |
Split a large model into shards
|
|
@@ -287,7 +287,7 @@ def main():
|
|
| 287 |
parser.add_argument(
|
| 288 |
"--shard-size",
|
| 289 |
type=float,
|
| 290 |
-
default=
|
| 291 |
help="Target shard size in MB"
|
| 292 |
)
|
| 293 |
|
|
|
|
| 47 |
|
| 48 |
def generate_placeholder_shards(
|
| 49 |
self,
|
| 50 |
+
shard_size_mb: float = 3010,
|
| 51 |
tensor_dtype: torch.dtype = torch.bfloat16
|
| 52 |
):
|
| 53 |
"""
|
|
|
|
| 122 |
def split_large_model(
|
| 123 |
self,
|
| 124 |
model_state_dict: Dict[str, torch.Tensor],
|
| 125 |
+
max_shard_size_gb: float = 3.01
|
| 126 |
):
|
| 127 |
"""
|
| 128 |
Split a large model into shards
|
|
|
|
| 287 |
parser.add_argument(
|
| 288 |
"--shard-size",
|
| 289 |
type=float,
|
| 290 |
+
default=3010,
|
| 291 |
help="Target shard size in MB"
|
| 292 |
)
|
| 293 |
|