EasyEdit icon indicating copy to clipboard operation
EasyEdit copied to clipboard

Adding hparams for Qwen3.5-9B

Open x-savassan-x opened this issue 4 months ago • 7 comments

Use context

  • [ ] A specific editing method (e.g., MEND, SERAC, ROME)
  • [ ] Support for a new model or architecture
  • [ ] Improved APIs or usability
  • [ ] Evaluation metrics or logging
  • [x] Other (please describe below)

What problem are you facing?

I'm using this project as baseline to develop my editing method and looking forward to apply it to recent models. However, for the methods I use as baselines, the only recent supported model is Qwen2.5-7B

Describe the feature you'd like to see

I would like to have Qwen3.5-9B (not Qwen3.5-9B-Base) support for these methods: FT, ROME, GRACE, R-ROME, WISE and AlphaEdit. I only need support on editing text model and don't require vision or multimodal support

Have you considered any alternatives?

No response

Additional context

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

x-savassan-x avatar Jul 05 '26 03:07 x-savassan-x

Added in #710.

TengJiao33 avatar Jul 07 '26 16:07 TengJiao33

@TengJiao33 are these hparams applicable for the base version (Qwen3.5-9B-Base)? Also, I found an override when precomputing layer stats of MEMIT or AlphaEdit that capped maxlen at 4096 for qwen2 only, but qwen and qwen3.5 don't get that. Is there a reason for that?

x-savassan-x avatar Jul 13 '26 06:07 x-savassan-x

Thanks for following up. The hparams added in #710 target Qwen3.5-9B, matching the scope of the original issue, rather than Qwen3.5-9B-Base.

The two checkpoints share the same model architecture and parameter layout, so most configurations should work after changing model_name. For AlphaEdit, the covariance statistics and null-space projection matrix still need to be generated specifically for the Base checkpoint.

The 4096 limit is a resource guard for layer-stat precomputation. It previously covered Qwen2 only, so Qwen3.5 could fall back to its 262K context length and create unnecessarily large statistics batches. We have now extended the existing min(length, 4096) guard to Qwen model types in 14cea82.

TengJiao33 avatar Jul 14 '26 12:07 TengJiao33

I notice that in the param use_chat_template of WISE is enable in your support for Qwen3.5. Should I disable it for base model?

x-savassan-x avatar Jul 14 '26 13:07 x-savassan-x

Yes. For Qwen3.5-9B-Base in the standard completion-style setup, please set use_chat_template: false. The true value in #710 is specific to the post-trained Qwen3.5-9B checkpoint and should not be carried over to Base automatically.

Although the Base checkpoint includes Qwen's official chat template and control tokens, enabling it changes WISE's editing and evaluation input format, which we have not validated for Base. Therefore, Base requires a separate configuration rather than only changing model_name.

TengJiao33 avatar Jul 14 '26 13:07 TengJiao33

quick question: you guys have a resource guard for qwen models, then what about llama models? I saw that AlphaEdit has hparams for llama3 already, so I'm assuming the method has been tested on llama

x-savassan-x avatar Jul 15 '26 11:07 x-savassan-x

Thanks for the question. Our initial hparams mostly follow the original papers and repositories, and we’ll add more commonly used models over time.

For Llama, you can start with our existing configs or refer to the AlphaEdit paper/codebase. For best results, we recommend tuning the hparams on your own dataset.

HaomingX avatar Jul 15 '26 12:07 HaomingX