Skip to content
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

Add duplication eliminating module #158

Closed
leogao2 opened this issue Feb 27, 2021 · 1 comment
Closed

Add duplication eliminating module #158

leogao2 opened this issue Feb 27, 2021 · 1 comment
Assignees

Comments

@leogao2
Copy link
Contributor

leogao2 commented Feb 27, 2021

The following usecases should be in mind for the refactor:

  • It should actually not be a pile of spaghetti
  • It should be possible to implement modules that consider that one LM query may be usable to answer multiple requests - for example, if the same query is repeated, or if there are two loglikelihood queries that each have the same context and different single-token-long-responses (there are a load of these - anything that continues with " yes" and " no" fits the bill). While it would be a violation of the abstraction to actually look at how many tokens the continuation is, it still makes sense to aggregate stuff with the same context and let LM know somehow that these are potentially-optimizable - and even it it's not single-token continuation, it might still be possible to cache the context or something. (this will require moderate changes to LM interface) I'm thinking tentatively maybe a flag it can pass along per-request to say "hey, this is something that should be cached for x times (evaluator counts how many times it expects it to be reused)" so only the things that get reused actually get cached, and get evicted when no longer necessary. This does have the chance that a new LM impl might not handle exactly the same and get out of sync on the count, but that just introduces inefficiency rather than breaking anything. Any better idea proposasls are welcome.
@leogao2
Copy link
Contributor Author

leogao2 commented Mar 6, 2021

On second thought, the second point would probably depend on LM internals. Probably best to implement it as a utility that LM impls can build off.

@leogao2 leogao2 changed the title Refactor evaluator to be modular Add duplication eliminating module Mar 26, 2021
@leogao2 leogao2 self-assigned this Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants