-
Notifications
You must be signed in to change notification settings - Fork 132
DeepSeek CoT Support for Filter and Map #142
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
Conversation
|
extract_deepseek_cot.py is broken right now. Getting APIconnectionError. Running Deepseek on Ollama, but issue with function_call['name']. Seems to be Litellm error |
|
The user shouldn't need to specify the type of reasoning -- we should set it based on the model, or just take the output string and check whether there is a token or something else |
lotus/sem_ops/sem_map.py
Outdated
|
|
||
| # post process results | ||
| postprocess_output = postprocessor(lm_output.outputs, strategy in ["cot", "zs-cot"]) | ||
| postprocess_output = postprocessor(lm_output.outputs, model, strategy in ["cot", "zs-cot"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could consider having class ReasoningStrategy(Enum) to be more clear on what all the different methods are. As I read the code, it feels things are getting a bit unwieldy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I agree
Introduces CoT for
sem_extractas well as supporting DeepSeek-R1 CoT for other semantic operators.Example output with
sem_map:Example output with
sem_filter:Users will need to specify the reasoning_parser. Example:
df = df.sem_map(user_instruction, return_explanations=True, strategy=ReasoningStrategy.ZS_COT)New Type for models:
ReasoningStrategy(Enum)