Skip to content

Move package usage docs to docs/package and slim .github/README.md to quickstart#3

Merged
apehex merged 2 commits intomainfrom
copilot/move-usage-docs-to-package-folder
Mar 25, 2026
Merged

Move package usage docs to docs/package and slim .github/README.md to quickstart#3
apehex merged 2 commits intomainfrom
copilot/move-usage-docs-to-package-folder

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

The current package usage documentation was concentrated in .github/README.md, making it hard to maintain and navigate by module. This PR relocates and expands usage docs under docs/package/, then simplifies the README to a quickstart + references.

  • Package docs split by module

    • Added dedicated usage guides under:
      • docs/package/layers/{index,shaping,embedding,transformer}.md
      • docs/package/metrics/{index,group_accuracy}.md
    • Migrated and refreshed examples for:
      • shaping (Divide, Merge)
      • embedding (TokunEmbedding, RotaryPositionalEmbedding)
      • transformer (FeedForwardNetwork, CachedMultiHeadAttention)
      • grouped metrics (CategoricalGroupAccuracy, BinaryGroupAccuracy, RawGroupAccuracy)
    • Aligned examples/arguments with current src/mlable/* APIs and expected usage patterns shown in tests.
  • README cleanup

    • Replaced long-form API sections in .github/README.md with:
      • install command
      • short quickstart snippet
      • links to the new module docs in docs/package/.
  • Docs navigation updates

    • Updated docs/package/index.md with direct links to newly added guides.
    • Updated docs/index.md to reference docs/package/ structure.
    • Updated docs/todo.md to reflect that metrics API examples now exist in package docs.
import tensorflow as tf
import mlable.layers.shaping
import mlable.metrics

x = tf.ones(shape=(2, 4, 8))
y = mlable.layers.shaping.Divide(axis=-1, factor=4, insert=True)(x)

metric = mlable.metrics.CategoricalGroupAccuracy(group=4)
score = metric(
    y_true=tf.one_hot([[1, 2, 3, 4]], depth=8),
    y_pred=tf.one_hot([[1, 2, 0, 4]], depth=8),
)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: apehex <17317183+apehex@users.noreply.github.com>
Copilot AI changed the title [WIP] Move usage information to docs/package directory Move package usage docs to docs/package and slim .github/README.md to quickstart Mar 16, 2026
Copilot AI requested a review from apehex March 16, 2026 18:55
@apehex apehex merged commit d4d5813 into main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants