Text Classification
Transformers
Safetensors
saif_decision
feature-extraction
typed-decisions
decision-model
system-one
jev-compatible
tool-use
routing
classification
calibration
custom-code
custom_code
Instructions to use GyrTechnology/saif-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GyrTechnology/saif-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="GyrTechnology/saif-4b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GyrTechnology/saif-4b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download serving/Dockerfile from GyrTechnology/saif-4b: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/GyrTechnology/saif-4b/resolve/main/serving/Dockerfile
- Command line
-
hf download hf://GyrTechnology/saif-4b/serving/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/GyrTechnology/saif-4b/resolve/main/serving/Dockerfile
620 Bytes
| FROM pytorch/pytorch:2.8.0-cuda12.8-cudnn9-runtime | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN python -m pip uninstall -y torchao && python -m pip install --no-cache-dir -r requirements.txt | |
| RUN useradd --create-home --uid 10001 saif | |
| COPY serve.py run.py ./ | |
| USER saif | |
| ENV SAIF_DEVICE=cpu SAIF_THREADS=4 PORT=8000 HF_HOME=/home/saif/.cache/huggingface PYTHONDONTWRITEBYTECODE=1 | |
| EXPOSE 8000 | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=180s --retries=3 CMD python -c "import os,urllib.request; urllib.request.urlopen('http://127.0.0.1:'+os.environ.get('PORT','8000')+'/health',timeout=4)" | |
| CMD ["python", "serve.py"] | |