Skip to content

Change the user history bigram memory weight to be more smooth on weight change - #144

Merged
wengxt merged 1 commit into
masterfrom
history
Oct 30, 2026
Merged

wengxt merged 1 commit into
masterfrom
history

Conversation

@wengxt

@wengxt wengxt commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Improvements
    • History-based suggestions now give older selections a lasting share of the overall history weight, helping previously selected words and word sequences remain represented as newer selections accumulate.
    • The balance between recent and older selections has been adjusted, with older selections retaining 64% of the total history weight.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3e62c9a-6724-4d16-9566-a4c0d6524dc4
Commits

Reviewing files that changed from the base of the PR and between 5be1300 and bd94c64.

Files selected for processing: 2
  • src/libime/core/constants.h
  • test/testhistorybigram.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

HISTORY_BIGRAM_ALPHA_VALUE changes from 1.0F to 0.25F. A new test checks that an earlier unigram and bigram remain above specified frequency thresholds after 8,320 distinct single-word histories are added.

Changes: History bigram retention

Layer / File(s) Summary
Update alpha and verify retention
src/libime/core/constants.h, test/testhistorybigram.cpp
The alpha constant changes to 0.25F. The test suite adds a retention check for an earlier unigram and bigram after adding 8,320 distinct single-word histories. The test is called from main.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to bd94c

The change preserves older history with the intended weighting, and the added retention check covers the regression targeted by this PR.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: smoothing the user-history bigram memory weight. The wording is awkward, but the title is specific and related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wengxt
wengxt merged commit 6fec305 into master Oct 30, 2026
6 checks passed
@wengxt
wengxt deleted the history branch October 30, 2026 16:47
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.

1 participant