Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C coderai
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexlab
  • coderai
  • Repository
  • coderai
  • codai
  • models
  • acceleration.py
Find file BlameHistoryPermalink
  • Stefy Lanza (nextime / spora )'s avatar
    fix: apply peft<->gptqmodel AWQ shim on the inference LoRA path too · 3fb6c9b9
    Stefy Lanza (nextime / spora ) authored Jun 26, 2026
    
    
    Loading a trained LoRA at inference (e.g. a fighter LoRA on an image pipeline)
    crashed with "cannot import name AwqGEMMQuantLinear" because peft dispatches AWQ
    for any non-bnb target when gptqmodel is installed, and gptqmodel 7.1.0 renamed
    that class to AwqGEMMLinear. The alias shim existed only in the training path.
    
    Extract it to codai/models/peft_compat.ensure_peft_awq_compat() (cached) and call
    it before load_lora_weights in codai/api/images._apply_loras and the acceleration
    fuse path; the trainer now delegates to the shared shim.
    
    Co-Authored-By: default avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
    3fb6c9b9