Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions context/dynamic_approaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Static methods' primary weakness is that they cannot address the importance of c
Therefore, to address the context uniqueness of all code snippets, we must approach code simplification in a dynamic method that can capture code context and dynamically assign importance score to each token before inference. A perfect dynamic method would satisfy the following:
1. Input: Tokenized code snippet. Output: Importance score for each individual token.
2. The compute required for this importance calculation must be much smaller than passing the code snippet through a multi-layer transformer model.
3. The input code snippet would be passed through this method's model first to calculate a simplified version, then this would be passed into the actual LLM.

The dynamic method would then be some form of a neural network model. To train this potential model, we build off of LeanCode's assumption that the attention score of the last transformer layer is most indicative of a token's importance. With this in mind, we then essentially have free training data. For all code snippets, we can pass it through our finetuned transformer models, extract their attention scores, and use the (code snippet, attention scores) pair as training data for our dynamic model.

Expand Down
Empty file added src/data/dynamic/__init__.py
Empty file.
Loading