Revision history for LLM::Classifiers::Emotions

0.1.8  2026-10-25T11:07:50Z

    - The README's account of the model is corrected. Cohee's ONNX export
      converts joeddav's distilbert-base-uncased-go-emotions-student, which
      was distilled from a zero-shot NLI teacher on unlabelled GoEmotions
      text, not fine-tuned on GoEmotions' labels. The base model is
      distilbert/distilbert-base-uncased, and GoEmotions is Apache-2.0, not
      CC BY 4.0. Joe Davison is now credited. The distribution also ships
      its Artistic-2.0 LICENSE file, which it lacked.

    - Requires HuggingFace::API 0.2.3 or later (to build). The exact 0.2.0
      pin made installs fetch that old release even with a newer one
      installed, and every HuggingFace::API before 0.2.3 still requires
      the JSON::Fast that fails under the RakuAST frontend.

    - Requires JSON::Fast 0.21.0 or later (zef:timo). 0.19 (cpan:TIMOTIMO)
      fails its own tests under the RakuAST compiler frontend that Rakudo
      2026.09 makes the default, so installing this distribution stopped
      at that dependency.

    - The model is now installed from this distribution's own GitHub
      release, binaries-cohee-goemotions-d22488bc-r1, with Hugging Face as
      the fallback. The release had never been published, so until now
      every install downloaded from Hugging Face.

    - The model mirror release built by hf-mirror.yml now carries the
      licence notices its contents owe: THIRD-PARTY.md, listing each
      upstream component with its licence, source and credit (Cohee's ONNX export and joeddav's student model, MIT; DistilBERT
      with its BERT vocabulary and the GoEmotions dataset, Apache-2.0);
      MODEL-CARD.md, the model card at the pinned revision; and LICENSES/
      with the full MIT and Apache-2.0 texts. The release body says so. A
      manual run of the workflow is now a dry run that uploads the tarball
      as a workflow artifact: only a pushed binaries-* tag publishes.

    - Installing stages the same notices beside the model files, whichever
      way the model arrived. Notices from the release tarball are kept as
      shipped. Otherwise THIRD-PARTY.md and LICENSES/ are written from the
      distribution's resources, and the model card is fetched from Hugging
      Face at the pinned revision and checked against its SHA-256 (if that
      fails, the install warns and carries on without it). A model staged
      by an earlier version gains its notices on the next install without
      being downloaded again.

    - Installing on Windows no longer trips over Unix tools. Replacing a
      stale staged directory no longer shells out to `rm -rf`, which
      Windows doesn't have, and the release archive is extracted by its
      file name from its own directory, so a GNU tar ahead of Windows' own
      on the PATH can't read the drive letter as a remote host name.

0.1.7  2026-08-21T22:40:32+01:00
    - Require Tokenizers 0.3.0 (panic-free FFI boundary with typed errors).

0.1.6  2026-08-11T11:59:30+01:00
    - Fix gitignore

0.1.5  2026-08-11T11:57:37+01:00
    - Fix typo, credit the person who suggested the module

0.1.4  2026-04-29T23:48:16+01:00
    - Bump Github actions to use node 24+

0.1.3  2026-04-24T06:47:14+01:00
    - test.yml: exclude windows-latest × hf-fallback from the
      matrix. The HF fallback goes through Cro::HTTP →
      IO::Socket::Async::SSL, which on the Windows runner fails
      with "Server certificate verification failed: unable to
      get local issuer certificate" — a known Raku-on-Windows
      CA-bundle issue, not fixable inside this module. The
      primary path (our hosted Release) works on Windows fine
      and is still tested under windows-latest × default.

0.1.2  2026-04-24T06:26:59+01:00
    - resources/checksums.txt: populate the tarball sha256
      produced by the first hf-mirror.yml run
      (2257f061…74ca1). Was previously a placeholder of
      zeros — macOS/Linux survived via the HF fallback path but
      Windows failed to fall through cleanly, so the primary
      path is the right one to make work on every platform.

0.1.1  2026-04-24T06:10:52+01:00
    - META6: fix HuggingFace::API build-depends version spec.
      Was `ver<0.2.0+>` (invalid — the `+` suffix isn't part of
      Raku's identity syntax and zef couldn't resolve it). Now
      `ver<0.2.0>`, matching the pinned-exact convention every
      other module by this author uses (Cro::HTTP:ver<0.8.11>,
      JSON::Fast:ver<0.19>, etc.). Requires HuggingFace::API
      0.2.0 to be published to the ecosystem.

0.1.0  2026-04-24T06:02:15+01:00
    - Initial release.
    - Workflow triggers aligned with the CRoaring / Tokenizers /
      ONNX-Native convention: hf-mirror.yml fires on
      workflow_dispatch OR push of a `binaries-*` tag (releases
      are deliberate, not incidental). Added pushed-tag-vs-
      BINARY_TAG mismatch guard.
    - .github/workflows/test.yml: runs `zef install .` + prove6
      on macOS / Linux / Windows for every branch push and PR,
      ignoring binaries-* tags so tag-push doesn't double-fire.
      Matrix dimension `install-mode` exercises both the default
      path (our Release primary, HuggingFace secondary) AND the
      explicit `LLM_EMOTIONS_FROM_HF=1` backup path so both code
      paths stay green.
    - 28-way text emotion classifier built on ONNX::Native +
      Tokenizers, backed by Cohee's quantized DistilBERT
      go-emotions model on HuggingFace
      (Cohee/distilbert-base-uncased-go-emotions-onnx at revision
      d22488bc83be87678f12eee8a3f65a65de94ef85).
    - Public class `LLM::Classifiers::Emotions::Classifier` with
      `new`, `classify`, `top`, `labels`, `raw-logits`, `dispose`.
      Softmax + argmax + top-k pipeline on top of the ONNX session;
      returns a score-sorted `List[Hash]` or a single argmax label.
    - Fully deterministic on the CPU execution provider —
      bit-identical logits across runs for the same input on the
      same ONNX Runtime version. Tests assert this invariant.
    - CoreML supported via `:providers<coreml cpu>`; scores diverge
      at the ~1e-3 level but the argmax label agrees with CPU.
    - Build.rakumod stages the three model files
      (tokenizer.json, config.json, model.onnx) under
      $XDG_DATA_HOME/LLM-Classifiers-Emotions/<BINARY_TAG>/ at
      install time. Primary download path: this repo's GitHub
      Release. Fallback: direct HuggingFace download via
      HuggingFace::API at the pinned revision.
    - Input truncation: 512 tokens (DistilBERT's positional
      embedding limit; Cohee's tokenizer.json has truncation
      disabled, so the classifier handles it internally).
    - Env knobs: LLM_EMOTIONS_BINARY_URL,
      LLM_EMOTIONS_BINARY_ONLY, LLM_EMOTIONS_FROM_HF,
      LLM_EMOTIONS_CACHE_DIR, LLM_EMOTIONS_DATA_DIR,
      LLM_EMOTIONS_MODEL_DIR.
    - Exceptions: X::LLM::Classifiers::Emotions::ModelMissing,
      X::LLM::Classifiers::Emotions::InvalidConfig.
    - New CI workflow: .github/workflows/hf-mirror.yml fetches
      the three files from HuggingFace at the pinned revision,
      sha256-verifies, bundles into
      cohee-goemotions-<BINARY_TAG>.tar.gz, and publishes to a
      GitHub Release on manual dispatch or BINARY_TAG change.
    - Tests: t/01-smoke (constructor + labels + softmax invariant),
      t/02-known-inputs (argmax + score bounds + determinism for
      seven hand-picked inputs), t/03-edge-cases (empty string,
      >512-token input, unicode / emoji, min-score threshold,
      disposed-classifier error path, 50-iteration leak check).
    - Upstream dep: HuggingFace::API 0.2.0+ (extended this release
      with `get-file` / `get-file-blob` / `get-file-to-file` and
      `:$revision` on existing tokenizer methods; back-compatible
      with 0.1.x callers).
