Skip to main content

Shog AI

Streaming dataset engineering for foundation model training.

Build multilingual AI datasets from Wikipedia, OPUS, Common Crawl and more with a unified schema — designed for large-scale LLM pretraining.

Why Shog AI?

Preparing multilingual, large-scale datasets for foundation model pretraining usually means gluing together one-off scripts for every source — Wikipedia dumps, OPUS corpora, Common Crawl shards — each with a different schema, different cleaning rules, and no consistent output format.

Shog AI standardizes that process. It gives you a single pipeline that ingests data from multiple sources, normalizes it into a unified schema, validates and deduplicates it, and exports it in a form ready for training or publishing.


Features

  • Unified schema — every source is normalized into the same record format
  • Streaming pipeline — process datasets without loading everything into memory
  • Multi-source ingestion — combine Wikipedia, OPUS, and other sources in a single run
  • Built-in validation & deduplication
  • One-line publishing — push finished datasets straight to the Hugging Face Hub or local storage
  • Reproducible outputs — every run produces metadata, statistics, and a manifest alongside the data

Installation

pip install shog-ai

Quick Start

from datasets import load_dataset, load_from_disk

from parsers.wikipedia import WikipediaParser
from pipeline.config import PipelineConfig
from pipeline.pipeline import Pipeline

# yo = load_from_disk("data/wikipedia/yo")
# yo = load_dataset("data/wikipedia/yo")
yo_10 = load_dataset(
    "wikimedia/wikipedia",
    "20231101.yo",
    split="train[:10]"
)

wiki = WikipediaParser(
    language="yo_10"
)

config = PipelineConfig(
    output_dir="output",
    dataset_name="shog_alpha",
)

pipeline = Pipeline(config)

stats = pipeline.process(
    (wiki, yo_10),
)

pipeline.summary()

Processing multiple sources at once

stats = pipeline.process(
    (wiki, wiki_dataset),
    (opus, opus_dataset),
    (books, books_dataset),
)

pipeline.summary(stats)

Architecture

Shog AI is built around three concepts:

  • Parsers — source-specific adapters (WikipediaParser, OpusParser, ...) that read raw data and emit standardized records
  • Pipeline — orchestrates one or more parsers, applies validation and deduplication, and writes output
  • Publishers — take a finished dataset and ship it somewhere (Hugging Face Hub, local storage, ...)
Source Dataset → Parser → Pipeline → Output Package → Publisher

Supported Datasets

  • ✅ Wikipedia
  • ✅ OPUS-100

Planned:

  • FLORES-200
  • OSCAR
  • Common Crawl
  • CC100
  • WikiMatrix
  • The Stack
  • FineWeb
  • Community datasets

Output Format

A pipeline run produces a self-contained dataset package:

output/

    shog_alpha/

        data.jsonl
        metadata.json
        statistics.json
        manifest.json
        README.md
        LICENSE

Standardized record

Every record, regardless of source, follows the same schema:

{
  "id": "...",
  "source": "...",
  "language": "...",
  "text": "..."
}

Publishing

Hugging Face Hub

Usage 1 — with a token

from shog.publishers import HuggingFacePublisher

publisher = HuggingFacePublisher(
    token="hf_xxxxxxxxx"
)

publisher.publish(
    dataset_path="output/shog_alpha/data.jsonl",
    repo_id="GodsaveKawurem/shog-alpha"
)

Usage 2 — CLI login (no token in code)

huggingface-cli login
publisher = HuggingFacePublisher()

publisher.publish(
    dataset_path="output/shog_alpha/data.jsonl",
    repo_id="GodsaveKawurem/shog-alpha"
)

Local storage

from publishers.local import LocalStorage

LocalStorage.save(
    dataset_path="output/shog_alpha/data.jsonl",
    output_dir="datasets/shog_alpha",
)

Documentation

[Unreleased]

Full documentation lives in docs/:


Roadmap

  • Common Crawl / CC100 support
  • FLORES-200 and OSCAR parsers
  • Configurable deduplication strategies
  • Streaming exporters for very large corpora
  • Expanded publisher targets

Contributing

Contributions are welcome. Please open an issue to discuss significant changes before submitting a pull request.


License

Released under the MIT License.


Citation

If you use Shog AI in your research, please cite:

@software{shog_ai,
  title  = {Shog AI: Streaming Dataset Engineering for Foundation Model Training},
  author = {Godsave Kawurem},
  year   = {2026},
  url    = {git@github.com:Perfect-Aimers-Enterprise/shog-ai-data}
}

About Shog AI

Shog AI is an open AI research initiative focused on building multilingual foundation models and research infrastructure, with an emphasis on African languages. This library provides the data engineering pipeline used to construct large-scale training corpora for foundation models.

Metadata

Release files for shog-ai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shog-ai 0.1.0
File Size Uploaded Provenance
shog_ai-0.1.0.tar.gz 28.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shog-ai 0.1.0
File Interpreter ABI Platform
shog_ai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.6 kB

Release files / shog_ai-0.1.0.tar.gz

Download URL shog_ai-0.1.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
350746c3baeeba3db95ef4cab95be649c017185c423ac6f4855b816e126386e5
BLAKE2b-256 checksum
How to use checksums
5d3dca78ef194ced2f1654c9919e7921d17cf51a8aa69ac7fdafbcf828311cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Release files / shog_ai-0.1.0-py3-none-any.whl

Download URL shog_ai-0.1.0-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f08695bc7144261eead26db05bfb221df809496894dda02083bd04c8fc1042d
BLAKE2b-256 checksum
How to use checksums
49c93664a6ed28b7ede40d0f775650ad23fa0a9fb2110509207d560939b34079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for shog-ai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page