Question Answering
sentence-transformers
Safetensors
GGUF
English
retrieval
cross-encoder
verification
citations
edge
cpu
offline
Eval Results (legacy)
Instructions to use RysoAI/tinyqa-1-moss with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use RysoAI/tinyqa-1-moss with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("RysoAI/tinyqa-1-moss") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use RysoAI/tinyqa-1-moss 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 RysoAI/tinyqa-1-moss:Q8_0 # Run inference directly in the terminal: llama cli -hf RysoAI/tinyqa-1-moss:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RysoAI/tinyqa-1-moss:Q8_0 # Run inference directly in the terminal: llama cli -hf RysoAI/tinyqa-1-moss:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf RysoAI/tinyqa-1-moss:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf RysoAI/tinyqa-1-moss:Q8_0
Use Docker
docker model run hf.co/RysoAI/tinyqa-1-moss:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use RysoAI/tinyqa-1-moss with Ollama:
ollama run hf.co/RysoAI/tinyqa-1-moss:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use RysoAI/tinyqa-1-moss with Docker Model Runner:
docker model run hf.co/RysoAI/tinyqa-1-moss:Q8_0
- Lemonade
How to use RysoAI/tinyqa-1-moss with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RysoAI/tinyqa-1-moss:Q8_0
Run and chat with the model
lemonade run user.tinyqa-1-moss-Q8_0
List all available models
lemonade list
- Atomic Chat
Download moss.sh from RysoAI/tinyqa-1-moss: direct link, hf CLI and curl.
- Browser
- Download file 4.43 kB
-
https://huggingface.co/RysoAI/tinyqa-1-moss/resolve/main/moss.sh
- Command line
-
hf download hf://RysoAI/tinyqa-1-moss/moss.sh
-
curl -L -o moss.sh https://huggingface.co/RysoAI/tinyqa-1-moss/resolve/main/moss.sh
4.43 kB
| # RysoAI TinyQA-1 Moss: load the models in the background, then ask questions from the terminal. | |
| # ./moss.sh setup one-off: Python 3.11 venv with CPU torch and the pinned packages (~1 GB download) | |
| # ./moss.sh start load the models in the background (DuckDuckGo search, no keys needed) | |
| # ./moss.sh ask "Who painted the Night Watch?" one answer (needs ./moss.sh start) | |
| # ./moss.sh ask type questions one after another; add --local to answer from the index | |
| # ./moss.sh index ~/Documents/notes index a folder of .txt/.md files (or a .jsonl of {"title","text"}) for offline use | |
| # ./moss.sh ask --local "What is the boiling point of water at altitude?" answer from the indexed files, no network | |
| # ./moss.sh stop | status | |
| # Optional: put SERPER_API_KEY=... in .env next to this script for Google results and verifier-gated retries. | |
| set -uo pipefail | |
| ROOT=$(cd "$(dirname "$0")" && pwd); CODE="$ROOT/code"; PY="$ROOT/.venv/bin/python"; PORT=${MOSS_PORT:-8091}; URL="http://127.0.0.1:$PORT" | |
| LOGS="$ROOT/data"; mkdir -p "$LOGS" | |
| stop_all() { pkill -f "tinyqa.server --port $PORT" 2>/dev/null; pkill -f "llama-server.*--port 80(89|93|95)" 2>/dev/null; true; } | |
| case "${1:-start}" in | |
| setup) | |
| command -v python3.11 >/dev/null || { echo "needs Python 3.11 (macOS: brew install python@3.11)"; exit 1; } | |
| python3.11 -m venv "$ROOT/.venv" && "$ROOT/.venv/bin/pip" install -q --upgrade pip && "$ROOT/.venv/bin/pip" install -q -r "$ROOT/requirements.txt" || exit 1 | |
| command -v llama-server >/dev/null || echo "optional: install llama.cpp (macOS: brew install llama.cpp) so the 113M models write the answer line; without it a template writes it" | |
| echo "setup done; next: ./moss.sh start";; | |
| start) | |
| [ -x "$PY" ] || { echo "run ./moss.sh setup first"; exit 1; } | |
| stop_all; sleep 1 | |
| [ -f "$ROOT/.env" ] && set -a && . "$ROOT/.env" && set +a | |
| export MOSS_HOME="$ROOT" MOSS_VERIFIER="$ROOT/models/verifier" MOSS_RANKER="$ROOT/models/ranker" MOSS_TAU_V=1.5 | |
| export MOSS_SOURCE_PENALTY=1 MOSS_QUOTABLE=1 MOSS_SEARCH=ddgs | |
| export MOSS_BLOCK_DOMAINS="${MOSS_BLOCK_DOMAINS:-}" # no sites blocked unless you list some | |
| # retries for uncertified answers go to Google; DuckDuckGo retries take 10-40 s, so without a Serper key they stay off | |
| if [ -n "${SERPER_API_KEY:-}" ]; then export MOSS_FALLBACK=1 MOSS_PLANNER_RETRY=1 MOSS_SIEVE_RETRY=1; else export MOSS_FALLBACK=0 MOSS_PLANNER_RETRY=0 MOSS_SIEVE_RETRY=0; fi | |
| if command -v llama-server >/dev/null; then | |
| export MOSS_VERBALIZE=own MOSS_VERBALISER=http://127.0.0.1:8095 | |
| (nohup llama-server -m "$ROOT/gguf/tinyqa-1-moss-glue-Q8_0.gguf" -c 2048 --port 8089 -t 4 --special > "$LOGS/decoder.log" 2>&1 &) | |
| (nohup llama-server -m "$ROOT/gguf/tinyqa-1-moss-planner-Q8_0.gguf" -c 1024 --port 8093 -t 4 --special > "$LOGS/planner.log" 2>&1 &) | |
| (nohup llama-server -m "$ROOT/gguf/tinyqa-1-moss-verbaliser-Q8_0.gguf" -c 1024 --port 8095 -t 4 --special > "$LOGS/verbaliser.log" 2>&1 &) | |
| else export MOSS_VERBALIZE=template; echo "llama-server not found: the answer line comes from a template"; fi | |
| (cd "$CODE" && nohup "$PY" -m tinyqa.server --port "$PORT" > "$LOGS/moss.log" 2>&1 &) | |
| for i in $(seq 1 180); do curl -s -m 1 "$URL/health" | grep -q '"models": true' && { echo "ready: ./moss.sh ask \"your question\""; exit 0; }; sleep 1; done | |
| echo "did not start; see $LOGS/moss.log"; exit 1;; | |
| index) | |
| [ -x "$PY" ] || { echo "run ./moss.sh setup first"; exit 1; } | |
| src=${2:?usage: ./moss.sh index <folder-or-jsonl>}; src=$(cd "$(dirname "$src")" && pwd)/$(basename "$src") | |
| (cd "$CODE" && MOSS_HOME="$ROOT" "$PY" -c 'import sys; from tinyqa import pipeline; print(f"indexed {pipeline.index_corpus(sys.argv[1]):,} passages from {sys.argv[1]}")' "$src" 2>&1 | grep -v -i warning) | |
| echo "ready to use: ./moss.sh ask --local \"your question\"";; | |
| stop) stop_all; echo stopped;; | |
| status) curl -s -m 1 "$URL/health" | grep -q '"models": true' && echo running || echo "not running";; | |
| ask) | |
| curl -s -m 1 "$URL/health" | grep -q '"models": true' || { echo "not running: ./moss.sh start first"; exit 1; } | |
| [ -f "$ROOT/.env" ] && set -a && . "$ROOT/.env" && set +a | |
| shift; cd "$CODE" && MOSS_PROVIDER=$([ -n "${SERPER_API_KEY:-}" ] && echo serper || echo ddgs) "$PY" -m tinyqa.cli "$URL" "$@";; | |
| *) sed -n 2,9p "$0";; | |
| esac | |