-
Notifications
You must be signed in to change notification settings - Fork 217
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
[WIP][documentation + parameters+states + optimizer] #22
Conversation
liyin2015
commented
May 20, 2024
•
edited by Sylph-AI
Loading
edited by Sylph-AI
- the intro page for the library
- the structure of all documentations
- Yaml output format
- dataclass to support different formats and communicate with generator's prompt template
- created our own few-shot bootstrap optimizer that has different sampling and optimizing method (random sample and class-balanced sampling for classification tasks)
- added parameters, states_dict, save and load both json and pickle.
- history tracking of parameters(save the states when each eval run)
…licated but it is important for performance or for experiementing
use_cases/classification/prompt.py
Outdated
- Do not output the class_name. | ||
""" | ||
|
||
EXAMPLES_STR = r"""Question: {{input}} |
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.
input data class and output data class can form examples_str
|
||
def call(self, query: str) -> str: | ||
str_response: Dict[str, Any] = self.generator.call( | ||
input=query, prompt_kwargs={"input": query} |
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.
the way to run llm it needs to take any number of input arguments -> and be passed to the generator! Need to design and think better.
@@ -0,0 +1,35 @@ | |||
from typing import Dict, Sequence |
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.
duplicate file
…ss balanced sampling, achieve almost best performance with only 4 steps and each step is only batch size 5, cost 20 more times inference
optimizer/sampler.py
Outdated
self, | ||
dataset, | ||
num_classes: int, | ||
get_data_key_fun: Callable, |
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.
label_map_fun