- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.5k
loader: refactor tensor weights storage #9935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
         kylo5aby
  
      
      
      commented
      
            kylo5aby
  
      
      
      commented
        Oct 18, 2024 
      
    
  
- I have read the contributing guidelines
- Self-reported review complexity:
- Low
- Medium
- High
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this will be quite redundant, because:
- get_weightsis only used when loading model tensors, so it's not worth optimizing it
- Total number of tensors is usually small (usually less than of 1000?), so a linear search is ok in most cases
| I think the goal of the change is good, the way we use this list of tensors is effectively  | 
| updated. PTAL | 
| The side effect of using a  | 
* loader: refactor tensor weights storage * use sorted map, sort weights by layer --------- Co-authored-by: slaren <[email protected]>
* loader: refactor tensor weights storage * use sorted map, sort weights by layer --------- Co-authored-by: slaren <[email protected]>