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

Local, sovereign, from-scratch LLMs — a tiny runtime + CLI for the Skylar model family. First release ships the COBOL specialist (Sophia-AI/SkylarCobol-390M): a 390M model that beats 7B general code models on COBOL generation, small enough to run on a single GPU (or CPU).

Install

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

Use it — CLI

# interactive chat (auto-downloads the model from HuggingFace the first time)
skylar chat

# one-shot completion
skylar generate --prompt "Scrivi un sottoprogramma COBOL che somma due interi in RESULT."

# point at a different model or a local checkpoint
skylar chat   --model Sophia-AI/SkylarCobol-390M
skylar generate --model ./my-checkpoint --prompt "..."

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

# OpenAI-compatible server (needs the [serve] extra) — auto-detects generative vs embedding
skylar serve --port 8000
#   generative model -> POST /generate                {"prompt": "..."}
#                       POST /v1/chat/completions     {"messages": [...]}
#   embedder model   -> POST /v1/embeddings           {"input": ["...", "..."]}

By default the system prompt is "Sei un esperto programmatore COBOL." and decoding is greedy (--temperature 0.0). Override with --system / --temperature.

Use it — Python

import skylar

m = skylar.load("Sophia-AI/SkylarCobol-390M")          # or a local dir
print(m.generate("Complete a COBOL paragraph that stores the max of two numbers in RESULT."))

for delta in m.stream("..."):                          # streaming
    print(delta, end="", flush=True)

# embeddings (any SkylarEmbedder model)
e = skylar.load_embedder("Sophia-AI/Skylar-236M-Embed")
vecs = e.encode(["la banca centrale alza i tassi", "previsioni meteo"])   # L2-normalized
ranked = e.rank("costo del denaro", ["la BCE alza i tassi", "ricetta pizza"])

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/SkylarCobol-390M")

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.0.tar.gz (29.4 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.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skylar-0.2.0.tar.gz
  • Upload date:
  • Size: 29.4 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.0.tar.gz
Algorithm Hash digest
SHA256 392cf8ffee97dd21f0eb96c0ed516713be339317c293613b68cfb3d293979ae2
MD5 70636d17c95b6668a1bb514a8252b411
BLAKE2b-256 b8919eb7e5c4364e382c736707300d26412f4810c2b69f2ac42f62499de01084

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skylar-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a47de7e9a06153c83cdaf3545443906d0d605defd637073e864196ae584e0856
MD5 b2b564d83f61f8224dcf020494b4d814
BLAKE2b-256 e05a7777daf91081fa6413b28bdc53559c82164398603851764c0ec7a7d10017

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