Repository navigation
Conversation
This branch has not been deployed
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.
Requirements
I have used Codex to compare changes needed to the DeekSeek-V3 implementation in mlx.lm src and changed it to support Sarvam models in mlx. I have a Mac machine and I wanted to use the mlx ports of the model on my machine. Sarvam is a startup that is building sovereign models for India and Indian languages. I'm not employed by the company or an investor in the company - I was just curious to run it on my machine. And its past models also do not have MLX support. So I ported the HF model to MLX and needed to add this support in mlx.lm to be able to execute inference on the models on my mac.
I used codex first to understand difference between the executors for Deepseek V3,3.2,4. Then asked it to look at the HF Sarvam 105B-1711 model and see which of these three is closest to the Sarvam model. Then asked it to make the required changes in the mlx.lm source code. Then I asked it to help me all the tests required so that this PR can be accepted. I'm also uploading the mlx 6-bit version of the model to HF under my personal public HF repo.
I have reviewed the code changes manually, and run all the unit tests - and all is OK.
Model information
Supported checkpoints
Verification
Conversion command:
Output:
Reference output (if you have access to CUDA hardware)
Do no have CUDA hardware
Validation
python -m unittest tests.models.test_sarvam_mla -vAll 3 focused Sarvam unit tests passed.

python -m unittest discover -v testsAll 437 project tests passed.

Black, isort, and Ruff passed.
