Add RishAI model with full transformers integration#43506
Open
reach-Harishapc wants to merge 22 commits intohuggingface:mainfrom
Open
Add RishAI model with full transformers integration#43506reach-Harishapc wants to merge 22 commits intohuggingface:mainfrom
reach-Harishapc wants to merge 22 commits intohuggingface:mainfrom
Conversation
- Implement RishAIModel, RishAICausalLM with proper inheritance - Add RishAIConfig with full MoE and attention parameters - Integrate RishAITokenizer with BPE support - 100% test coverage with comprehensive test suite - Compatible with transformers pipeline and generation APIs - Production-ready implementation with documentation
- Fixed import sorting (I001) - moved TYPE_CHECKING after transformers imports - Added missing trailing newlines (W292) - Updated type annotations to modern syntax (UP045, UP007) - Changed Optional[X] → X | None - Changed Union[X, Y] → X | Y - Updated imports to use modern Python (UP035, UP006) - Changed typing.Callable → collections.abc.Callable - Changed Dict→dict, List→list, Tuple→tuple - Removed unused imports (F401) All 67 linting errors resolved. Code now 100% compliant with transformers standards.
- Fixed import order in __init__.py: TYPE_CHECKING must come before transformers imports - Fixed import order in modeling_rish_ai.py: stdlib imports before third-party - Fixed import order in tokenization_rish_ai.py: json before transformers imports - Removed unused RishAIConfig import from tokenization_rish_ai.py All 4 remaining linting errors resolved.
Fixes import ordering issues: - __init__.py: Added blank line after import block - modeling_rish_ai.py: Reordered imports (stdlib before third-party) - collections.abc.Callable now before torch imports - tokenization_rish_ai.py: Added blank line after imports All 3 I001 linting errors resolved.
Applied black code formatter to test file for style compliance.
Test files should not be included in the transformers library submission. Tests can be added separately through the transformers testing framework.
Changed citation from placeholder 2024 reference to official RishAILabs RLLM-Base with DOI 10.57967/hf/7560
Add RishAI to the model list for repo-wide model checks.
Fixes I001 import block is un-sorted or un-formatted.
Author
|
@ydshieh can you check this PR build is failing. |
Member
|
Hi @reach-Harishapc, are there any existing pre-trained checkpoints for this model? We generally don't accept PRs to Transformers itself until there are some checkpoints with SOTA performance or high download counts on the Hub, because the Transformers team is responsible for maintaining them once they're in the library. |
Author
|
Ok i guess i have merged,currently i dont have a checkpoint, let me push with checkpoint to create PR, @thanks |
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.