Skip to main content

Paper-style workflow preparation for Arabic morphology probing experiments.

Project description

Sarf Atlas

Sarf is a backend-agnostic research framework for Arabic morphology probing experiments. It organizes datasets, prompts, splits, experiment configs, extraction metadata, and evaluation artifacts, and is designed to let hidden states or logits come from Ember, llama.cpp, Transformers, or precomputed files.

Architecture slogan:

Sarf organizes.
Backends extract.
Auditors compare.

Sarf Atlas is not replacing Ember. Ember is currently the strongest local backend path, but Sarf should not depend on one inference engine. Sarf owns Arabic morphology schemas, task definitions, prompt templates, split strategies, experiment configs, expected artifact schemas, report scaffolding, backend-agnostic validation, and adapters for importing backend outputs.

Sarf does not own model execution internals, hidden-state extraction implementation, llama.cpp compilation as a required behavior, or Ember internals. Base Sarf works without local extraction backends installed.

The current split is:

  • ember: one validated backend/tooling path for extraction artifacts.
  • sarf-atlas: Arabic morphology research workspace, paper configs, notes, experiment manifests, package skeleton, and backend-agnostic workflow planning.
  • gguf-parity-tools: validation and parity harness.

Quickstart

Install Sarf Atlas:

pip install sarf-atlas

Create a project layout:

sarf init --out-dir /tmp/sarf-atlas-project --name sarf-atlas-project

Generate the toy workflow scaffold:

sarf example-workflow --out-dir /tmp/sarf-atlas-example

Import and summarize artifacts:

sarf import-artifacts --from files --run-id toy-run --prompts-path prompts/toy_prompts.jsonl --out artifacts/imported/toy-run.manifest.json
sarf summarize-run --manifest artifacts/imported/toy-run.manifest.json

The scaffold writes toy morphology data, prompts, split metadata, Ember config placeholders, a Sarf artifact manifest, and an example workflow manifest. It is framework scaffolding only, not hidden-state extraction, Paper 1 reproduction, or research output. See docs/CLI.md for the backend capability matrix.

Paper-Style Workflow Preparation

Sarf v0.3 adds commands for realistic Arabic morphology experiment preparation:

sarf validate-dataset examples/paper_style/tiny_morphology.jsonl
sarf make-prompts examples/paper_style/experiment.toml --out /tmp/sarf-v03/prompts.jsonl
sarf make-splits examples/paper_style/experiment.toml --out /tmp/sarf-v03/splits.json
sarf make-experiment examples/paper_style/experiment.toml --out /tmp/sarf-v03/run
sarf report /tmp/sarf-v03/run --out /tmp/sarf-v03/report.md

This supports dataset rows, prompt construction, label fields, lemma-heldout/root-heldout split metadata, character-baseline metadata placeholders, backend config stubs, artifact import, and report scaffolding. Sarf v0.3 does not train probes, run models, extract hidden states, or claim paper reproduction.

Current adapter namespace:

  • sarf.backends.ember
  • sarf.backends.files
  • sarf.backends.llama_cpp

Future optional adapters may cover Transformers/HF, vLLM, and additional precomputed hidden-state formats.

Optional Backends

Sarf v0.3 can inspect local backend availability, but detection is optional and does not make llama.cpp, Ember, Transformers/HF, or hidden-state extraction part of the base package:

sarf backends list
sarf backend llama-cpp doctor
sarf backend ember doctor

llama.cpp detection checks LLAMA_TOKENIZE_BIN, LLAMA_CLI_BIN, LLAMA_SIMPLE_BIN, and common PATH names. Default llama.cpp is useful for some local tokenization/logits workflows, but it should not be treated as emitting Sarf-compatible hidden-state artifacts.

Ember detection checks EMBER_BIN, PATH ember, and whether ember validate-run --help is callable when an Ember binary is found. Ember is optional; Sarf can still organize workflows and import artifacts from files.

Users may bring artifacts from llama.cpp, Ember, HF/Transformers, or precomputed files. Hidden-state extraction is not built into base Sarf and requires an emitting backend such as Ember, patched llama.cpp, HF/Transformers, or precomputed Sarf-compatible artifacts.

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

sarf_atlas-0.3.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

sarf_atlas-0.3.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file sarf_atlas-0.3.0.tar.gz.

File metadata

  • Download URL: sarf_atlas-0.3.0.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for sarf_atlas-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d8349df615fb1c87466bcf217ff0fe315a638585456f93faef48b21193f93d8f
MD5 3ae35d03924ccfa5a716ab778f1d9b4a
BLAKE2b-256 9108ab1d5ab3054e38891bc46a044fede5de7eb626a352058dbc1cac8812dd5b

See more details on using hashes here.

File details

Details for the file sarf_atlas-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sarf_atlas-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for sarf_atlas-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d19747863aa3caaff1ca6335c81d2590fa577f6cc2e3a3041537a06551524655
MD5 b7947a51472ed7be70c84fa1d36e1495
BLAKE2b-256 2850ca464e512188d7c574f05116c07dbc82af340a72d8d37bea65779702ee9e

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