You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few optimizations we can make for the llm tester and I laid them out below:
the results_exists method checks if a task has finished for a specific context length and document depth by iterating over every file in results/. This can be optimized by looking for a specific file since we know the file name formatting being used.
the insert_needle method finds the most recent . token in the context and inserts the needle right after it. This search is done with a while loop that always overwrites tokens_new_context, which can be large. An optimization, which wont give much of a performance boost but still worth doing, is indexing directly to the . token after the search is complete.
the read_context_files method finds the length of the context, in tokens, for every file it has appended. Instead, we can find the length of the newest file's content to avoid tokenizing the same pieces of text.
Moving from asyncio.gather(*tasks) to using async with asyncio.TaskGroup() as tg as suggested here
The text was updated successfully, but these errors were encountered:
There are a few optimizations we can make for the llm tester and I laid them out below:
results_exists
method checks if a task has finished for a specific context length and document depth by iterating over every file inresults/
. This can be optimized by looking for a specific file since we know the file name formatting being used.insert_needle
method finds the most recent.
token in the context and inserts the needle right after it. This search is done with a while loop that always overwritestokens_new_context
, which can be large. An optimization, which wont give much of a performance boost but still worth doing, is indexing directly to the.
token after the search is complete.read_context_files
method finds the length of the context, in tokens, for every file it has appended. Instead, we can find the length of the newest file's content to avoid tokenizing the same pieces of text.asyncio.gather(*tasks)
to usingasync with asyncio.TaskGroup() as tg
as suggested hereThe text was updated successfully, but these errors were encountered: