Skip to content

Conversation

@YoctoHan
Copy link

@YoctoHan YoctoHan commented Nov 10, 2025

✨ Pull Request Summary

🚀 Implemented Features

  • Implemented the AiXcoder model architecture.
  • Added a custom tokenization logic specific to AiXcoder.
  • Completed initial pre-training validation tests.
  • Verified training and fine-tuning pipelines.
  • Added model usage and reproduction instructions in the README.

🧩 Code Quality

  • ✅ All changes have passed pre-commit checks successfully.
  • Code format, style, and lint validations fully comply with project conventions.

🧪 To‑Do

  • Add additional unit tests under the tests folder.
    If any codecov coverage issues arise, please include corresponding test cases first.

📂 PR Type

  • New features
  • Bug fixes
  • Function optimization
  • Performance optimization
  • Breaking changes
  • Others

🧱 PR Changes

  • Models
  • APIs
  • Docs
  • Others

📝 Description

This PR introduces the AiXcoder model to PaddleFormers, including its complete model architecture, tokenizer, and validation for both pre-training and SFT/finetuning workflows.
All code components have passed pre-commit checks and are aligned with PaddleFormers’ coding and documentation standards.
It expands the model zoo with a reproducible AiXcoder training pipeline ready for integration and further evaluation.


🧑‍💻 Checklist

  • Code passes all pre-commit lint and format checks
  • Model training/finetuning pipeline validated
  • Unit tests added for new components
  • Documentation updated (README, configs, or tutorials)

@paddle-bot
Copy link

paddle-bot bot commented Nov 10, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Nov 10, 2025

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 97.00000% with 9 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@daba927). Learn more about missing BASE report.

Files with missing lines Patch % Lines
paddleformers/transformers/auto/tokenizer.py 25.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2902   +/-   ##
==========================================
  Coverage           ?   31.73%           
==========================================
  Files              ?      425           
  Lines              ?    68827           
  Branches           ?        0           
==========================================
  Hits               ?    21839           
  Misses             ?    46988           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@YoctoHan YoctoHan force-pushed the feat/aixcoder branch 2 times, most recently from 8db79fe to 68c92d8 Compare November 11, 2025 07:36
@YoctoHan YoctoHan closed this Nov 12, 2025
@YoctoHan YoctoHan reopened this Nov 12, 2025
@YoctoHan YoctoHan closed this Nov 13, 2025
@YoctoHan YoctoHan reopened this Nov 13, 2025
@YoctoHan YoctoHan closed this Nov 13, 2025
@YoctoHan YoctoHan reopened this Nov 13, 2025
@YoctoHan YoctoHan closed this Nov 14, 2025
@YoctoHan YoctoHan reopened this Nov 14, 2025
@YoctoHan YoctoHan force-pushed the feat/aixcoder branch 2 times, most recently from 49ec0fd to 1b73a8c Compare November 14, 2025 09:14
@YoctoHan YoctoHan closed this Nov 15, 2025
@YoctoHan YoctoHan reopened this Nov 15, 2025
YoctoHan and others added 2 commits November 15, 2025 03:11
… validation

- Implemented the Aixcoder model architecture
- Added custom tokenization logic
- Completed initial validation tests (pre-training verification)
- Prepared for upcoming training and fine-tuning validation
- Documented usage in README for model reproduction
# Row Linear
"aixcoder.embed_tokens.weight": partial(fn, is_column=False),
"aixcoder.layers.0.self_attn.o_proj.weight": partial(fn, is_column=False),
"aixcoder.layers.0.mlp.down_proj.weight": partial(fn, is_column=False),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

权重的名字确定前缀是aixcoder而不是model吗,我在hugging face仓库里查到的权重名字前缀都是model?
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们计划在星河社区开源 paddle 版本的权重,这个版本的权重前缀为 aiXcoder,接下来我会将前缀统一为 model,包括组网代码中的部分和权重。

"aixcoder.layers.0.self_attn.q_proj.weight",
"aixcoder.layers.0.self_attn.k_proj.weight",
"aixcoder.layers.0.self_attn.v_proj.weight",
"aixcoder.layers.0.self_attn.qkv_proj.weight",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样确认下权重名字前缀的问题

>>> tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
"Hey, are you conscious? Can you talk to me?\nI'm not conscious, but I can talk to you."
```"""
output_attentions = output_attentions if output_attentions is not None else self.config.output_attentions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

output_attentions已经不再需要,辛苦在整个组网中去除这个逻辑

def set_decoder(self, decoder):
self.aixcoder = decoder

def get_decoder(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以上get_xxx/set_xxx函数,请在PretrainedModel里确认,是否还需要写在组网里

class PretrainedModel(Layer, GenerationMixin, ConversionMixin):

]


class AixcoderPretrainedModel(PretrainedModel):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

近期llama组网有重构更新,预计本周之内会合入,辛苦按照新组网的标准更新一下aiXcoder的组网,尤其需要关注_init_weights等在新组网中多余的部分
#2770

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请按照库中其他模型的方式,添加test_modeling单测文件,覆盖ModelTest,IntegrationTest等case。
https://github.com/PaddlePaddle/PaddleFormers/blob/develop/tests/transformers/qwen3/test_modeling.py
其他单测文件可以移除

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license文件可删除

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readme文件可删除

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants