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
Create Dockerfile
Browse files- Dockerfile +58 -0
Dockerfile
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Helion-OSC Docker Image
|
| 2 |
+
FROM nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
+
ENV PYTHONUNBUFFERED=1
|
| 7 |
+
ENV CUDA_HOME=/usr/local/cuda
|
| 8 |
+
ENV PATH=${CUDA_HOME}/bin:${PATH}
|
| 9 |
+
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 10 |
+
|
| 11 |
+
# Install system dependencies
|
| 12 |
+
RUN apt-get update && apt-get install -y \
|
| 13 |
+
python3.10 \
|
| 14 |
+
python3-pip \
|
| 15 |
+
git \
|
| 16 |
+
wget \
|
| 17 |
+
curl \
|
| 18 |
+
vim \
|
| 19 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
+
|
| 21 |
+
# Upgrade pip
|
| 22 |
+
RUN pip3 install --upgrade pip setuptools wheel
|
| 23 |
+
|
| 24 |
+
# Set working directory
|
| 25 |
+
WORKDIR /app
|
| 26 |
+
|
| 27 |
+
# Copy requirements
|
| 28 |
+
COPY requirements.txt .
|
| 29 |
+
|
| 30 |
+
# Install Python dependencies
|
| 31 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 32 |
+
|
| 33 |
+
# Install additional dependencies for API server
|
| 34 |
+
RUN pip3 install --no-cache-dir \
|
| 35 |
+
fastapi \
|
| 36 |
+
uvicorn[standard] \
|
| 37 |
+
pydantic \
|
| 38 |
+
python-multipart
|
| 39 |
+
|
| 40 |
+
# Copy application files
|
| 41 |
+
COPY . .
|
| 42 |
+
|
| 43 |
+
# Create directories for models and cache
|
| 44 |
+
RUN mkdir -p /app/models /app/cache /app/outputs
|
| 45 |
+
|
| 46 |
+
# Set Hugging Face cache directory
|
| 47 |
+
ENV HF_HOME=/app/cache
|
| 48 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
| 49 |
+
|
| 50 |
+
# Expose port for API server
|
| 51 |
+
EXPOSE 8000
|
| 52 |
+
|
| 53 |
+
# Health check
|
| 54 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
| 55 |
+
CMD curl -f http://localhost:8000/health || exit 1
|
| 56 |
+
|
| 57 |
+
# Default command (can be overridden)
|
| 58 |
+
CMD ["python3", "api_server.py", "--host", "0.0.0.0", "--port", "8000"]
|