Instructions to use Arain119/sophia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Arain119/sophia with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Arain119/sophia:Q4_K_M # Run inference directly in the terminal: llama cli -hf Arain119/sophia:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Arain119/sophia:Q4_K_M # Run inference directly in the terminal: llama cli -hf Arain119/sophia:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Arain119/sophia:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Arain119/sophia:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Arain119/sophia:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Arain119/sophia:Q4_K_M
Use Docker
docker model run hf.co/Arain119/sophia:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Arain119/sophia with Ollama:
ollama run hf.co/Arain119/sophia:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Arain119/sophia with Docker Model Runner:
docker model run hf.co/Arain119/sophia:Q4_K_M
- Lemonade
How to use Arain119/sophia with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Arain119/sophia:Q4_K_M
Run and chat with the model
lemonade run user.sophia-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download config_projection.py from Arain119/sophia: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/Arain119/sophia/resolve/main/config_projection.py
- Command line
-
hf download hf://Arain119/sophia/config_projection.py
-
curl -L -o config_projection.py https://huggingface.co/Arain119/sophia/resolve/main/config_projection.py
1.36 kB
| # Generated by ml.integrations.export.runtime_packager.write_remote_code_bundle. | |
| # Exported for HuggingFace trust_remote_code loading. | |
| # This file is intentionally self-contained. | |
| """Projection helpers for the native Sophia Hybrid configuration.""" | |
| from __future__ import annotations | |
| from dataclasses import fields | |
| from typing import Protocol, TypeVar | |
| class RuntimeModelArgsSource(Protocol): | |
| max_seq_len: int | |
| RuntimeModelArgsT = TypeVar("RuntimeModelArgsT") | |
| def build_runtime_model_args( | |
| config: RuntimeModelArgsSource, | |
| *, | |
| model_args_cls: type[RuntimeModelArgsT], | |
| runtime_max_seq_len: int | None = None, | |
| ) -> RuntimeModelArgsT: | |
| max_seq_len = int(config.max_seq_len) | |
| if runtime_max_seq_len is not None: | |
| runtime_limit = int(runtime_max_seq_len) | |
| if not 0 < runtime_limit <= max_seq_len: | |
| raise ValueError( | |
| "runtime_max_seq_len must be in (0, config.max_seq_len], " | |
| f"got {runtime_limit} with max {max_seq_len}" | |
| ) | |
| max_seq_len = runtime_limit | |
| kwargs: dict[str, object] = {} | |
| for arg_field in fields(model_args_cls): | |
| if hasattr(config, arg_field.name): | |
| kwargs[arg_field.name] = getattr(config, arg_field.name) | |
| kwargs["max_seq_len"] = max_seq_len | |
| return model_args_cls(**kwargs) | |
| __all__ = ["build_runtime_model_args"] | |