Skip to content

Fix problem 85 positional encoding example (Issue #495)#595

Open
vishesh-banna0 wants to merge 1 commit into
Open-Deep-ML:mainfrom
vishesh-banna0:fix/495-q85-position-encoding
Open

Fix problem 85 positional encoding example (Issue #495)#595
vishesh-banna0 wants to merge 1 commit into
Open-Deep-ML:mainfrom
vishesh-banna0:fix/495-q85-position-encoding

Conversation

@vishesh-banna0

Copy link
Copy Markdown

Summary

This PR fixes the example for Problem 85: Positional Encoding Calculator.

Changes

  • Corrected the example output to match the standard sinusoidal positional encoding described in the original Transformer architecture.
  • Fixed the ordering of sine and cosine values (sine at even indices and cosine at odd indices).
  • Removed the incorrect extra array dimension from the sample output.
  • Updated the reasoning to accurately describe how positional encoding is computed.

Verification

The corrected example output was regenerated using the reference implementation of the positional encoding algorithm.

Correct output generated by the implementation:

Generated positional encoding output

Current example displayed on the website:

Current example on website

Closes #495

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.

Problem 85: Position Encoding example issue

1 participant