Skip to main content

Skylar — local, sovereign, from-scratch LLMs. CLI + loader for the Skylar model family: generative (chat/cobol) and embeddings.

Project description

skylar

A tiny runtime + CLI for the Skylar model family — local, sovereign, from-scratch LLMs you load, run, and serve with one pip install. It covers generative chat, embeddings / retrieval, and a COBOL code specialist — all 390M-class or smaller, runnable on a single GPU or CPU, no data leaving your machine.

Models live under Sophia-AI on HuggingFace: Skylar-236M-Base · Skylar-236M-Chat · Skylar-236M-Embed · SkylarCobol-390M.

Install

pip install skylar
# optional HTTP server:
pip install "skylar[serve]"

Use it — CLI

# chat with any Skylar generative model (no forced persona — steer it with --system)
skylar chat --model Sophia-AI/Skylar-236M-Chat --system "Sei un assistente che risponde dal contesto."

# embeddings / retrieval (any SkylarEmbedder model)
skylar embed --model Sophia-AI/Skylar-236M-Embed --query "prestito casa" --docs "mutuo" "meteo"

# one-shot generation (HF repo id or a local checkpoint dir)
skylar generate --model Sophia-AI/Skylar-236M-Chat --prompt "..."

# the COBOL specialist: complete a stub into a full, compilable program
skylar cobol --example --model Sophia-AI/SkylarCobol-390M

# OpenAI-compatible server (needs the [serve] extra) — auto-detects generative vs embedding
skylar serve --model <any-skylar-model> --port 8000
#   generative model -> POST /generate            POST /v1/chat/completions
#   embedder model   -> POST /v1/embeddings

Decoding is greedy by default (--temperature 0.0); there is no forced system prompt — pass --system "..." to steer a chat model. (The skylar cobol subcommand handles the COBOL prompt format for you.)

Use it — Python

import skylar

# generative chat — pass your own system prompt (no forced persona)
m = skylar.load("Sophia-AI/Skylar-236M-Chat")          # HF repo id or a local dir
print(m.generate("Domanda: dove ha sede la Banca d'Italia?",
                 system="Rispondi solo dal contesto fornito."))
for delta in m.stream("..."):                          # streaming
    print(delta, end="", flush=True)

# embeddings / retrieval
e = skylar.load_embedder("Sophia-AI/Skylar-236M-Embed")
ranked = e.rank("costo del denaro", ["la BCE alza i tassi", "ricetta pizza"])

# the COBOL specialist
c = skylar.load("Sophia-AI/SkylarCobol-390M")
print(c.complete_cobol(my_stub))                       # -> full, compilable COBOL program

skylar also registers the architecture with 🤗 Transformers, so this works too:

import skylar  # registers nano-transformer
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Sophia-AI/Skylar-236M-Chat")

What's inside

The Skylar models use a custom decoder (NanoTransformer, Qwen3-style: RMSNorm + RoPE + GQA + QK-Norm + SwiGLU), trained 100% from scratch (no third-party pretrained weights). This package vendors the architecture so the published weights load anywhere — no private framework needed.

License

Apache-2.0. Models & code IP: A. Ivanovitch (Sophia AI).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skylar-0.2.1.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skylar-0.2.1-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file skylar-0.2.1.tar.gz.

File metadata

  • Download URL: skylar-0.2.1.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for skylar-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7dc4ed6af1c7a59af4598a77e77866ecbe4899dd2de8ed192b2327ffb543d489
MD5 c2ef949c6d9993108e3d5b2f326ae082
BLAKE2b-256 d84c0983de5bf293931bde1521ea00dbfaadd96daee1dc7ad270bad63811d003

See more details on using hashes here.

File details

Details for the file skylar-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: skylar-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for skylar-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5f74947b69893eb648789bd692e0684c1cf217dfb6c75eb1198600a3bd8d0a5
MD5 fea6a11aac091b7fd3b6f0afb8c0e3fc
BLAKE2b-256 422bec414c2cdc29699565a2b9372f5cc91f0b3787a328c6e5d97d29edb35648

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page