-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support reasoning models like deepseek r1 #109
Comments
Hi! While we can add that, I'm curious if you think it's really required. Reasoning models have much higher response latencies due to the inference-time compute, and really wouldn't be suited to Writing Tools's grammar correction features. In fact, based on my experiments, reasoning models do not perform better with grammar correction (and sometimes overthink). Let me know if there's a specific use case or scenario where you feel reasoning models would make a good difference! |
Thanks for the issue and the thoughtful response - I have a use case that would surely benefit from using a reasoning model: I would like to have text proofread, revised and commented upon based on a style guide. Many institutions, companies, organisations have style guides and a lot of time is spent aligning texts with these specific requirements. Especially some of the higher level requirements of such a guide (where it goes beyond right and wrong ways of doing things but makes suggestions or offers several alternative wordings or makes appeals to using a certain style and avoiding another one) might be better taken into account b a reasoning model. |
@menelic , thanks for your perspective — that makes a lot of sense, and it's something that didn't strike me. Coming to think of it, I'm sure there'd be other use cases too (code modifications, etc.). And your use case will be especially propelled once we release customisable buttons and prompts (something @momokrono has very kindly mostly implemented already :D). Now here's some AWESOME news: Writing Tools happens to already support reasoning models haha! I went through the DeepSeek R1 documentation, and it uses the same OpenAI API we already support. The best part? There are no reasoning tokens (to exclude) when not using streaming, which is how Writing Tools currently operates. To use R1, simply open Writing Tools settings and set: The same easy existing support for R1 should extend to the macOS version too. Annnd it even supports @davidcampos and @menelic have fun! |
How about using it with Ollama deepseek r1 distilled models? Does it also offer a streaming option to not send the reasoning tokens? |
Do you mean using their OpenAI-compatible APIs or their own? Right now we don't support ollama-native APIs, I've created a branch to add this feature but it hasn't been merged into main yet. And in any case, I don't know if ollama offers such an option, I will investigate. |
Yes, using OpenAI-compatible APIs of Ollama. |
@davidcampos, could you try using one of those models with Ollama (OpenAI API) + Writing Tools? If it doesn't, we can add an option to remove these tokens. And haha, I'm glad to hear you're delighted with it. @momokrono, I'm really sorry I hadn't yet merged the Ollama implementation. It's currently not automatically mergeable, so I'll work on merging it when I get the time in the coming days. Thank you again for creating that! |
No worries! I'll have a look tomorrow, hopefully it's a matter of changing a few lines of code |
I just tried it with the proofread option. Using Ollama with deekseek-r1 32b. Input:
Output:
|
@davidcampos thanks for testing it. hah, that's a lot of thinking. I'll add a "For some reasoning models: Remove thinking tags" checkbox in the OpenAI/Ollama model selector that lets you get rid of these in the future. |
@theJayTea I fixed the ollama provider and just pushed it to dev. It can be merged automatically into main. After that we could remove the |
@momokrono thank you! Shall I merge dev to main right now? |
@theJayTea if after testing the dev branch you see no errors or bugs, yes why not! Mind that something I haven't tested is the compilation into a windows executable, since I don't have a windows PC to test on... I don't think it won't compile, probably the only thing to do is to add the |
@momokrono Ah yep! I reckon it'll work just fine, and I'll of course test it and merge it by our next release this week — along with adding a GUI. |
may I ask where is the config.json file on mac located? |
Support reasoning models like deepseek r1 automatically excluding the [""] tags.
The text was updated successfully, but these errors were encountered: