-
Notifications
You must be signed in to change notification settings - Fork 101
top_k deepseek cot support #171
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
lotus/sem_ops/sem_topk.py
Outdated
@@ -37,54 +41,75 @@ def get_match_prompt_binary( | |||
content_text, content_image_inputs = task_instructions.context_formatter(doc) | |||
prompt += [{"type": "text", "text": f"\nDocument {idx+1}:\n{content_text}"}, *content_image_inputs] | |||
|
|||
if strategy == ReasoningStrategy.ZS_COT and model.get_model_name().startswith("deepseek-r1"): |
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.
can we have a function in the model class or util that returns whether the model is deepseek or not? IMO it is more comprehensive in case some other vendor is used for Deepseek
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.
do you mean like instead of the get_model_name
function in the LM class?
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.
Don't need to remove get_model_name
. For now, we can have is_deepseek
function in the LM class.
Later on, if we have more such cases, we can have an Enum for ModelType and a function/property to return ModelType for an instance of the LM class. @liana313 what are your thoughts?
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.
I agree, we should avoid hardcoding "deepseek-r1" anywhere in the code. .get_model_name().is_deepseek() is okay for now
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.
I see, okay I can get that done
Introduces DeepSeek CoT for
Sem_topk
operator.Function call:
Example Output: