-
Notifications
You must be signed in to change notification settings - Fork 86
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
Async startup support #73
Closed
BruceKristelijn
wants to merge
5
commits into
undreamai:release/v1.0.7
from
Savanna-Developments:main
Closed
Async startup support #73
BruceKristelijn
wants to merge
5
commits into
undreamai:release/v1.0.7
from
Savanna-Developments:main
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Initial commit * Add the first version of Sharp Transformers 🥳 * Remove Sentis from dependencies Sentis is for now a preview package, so we can't install it from dependencies * Add the meta files * Add package.json * Update namespace We created HuggingFace.SharpTransformers namespace. This ensure a clean import * Add assembly definition for HuggingFace.SharpTransformers * Remove sentis requirements * Set classes to public since protection level block the access of these * Update Tokenizers * Update README.md * Update README.md * Update README.md * initial experiment * initial working method with Sentis * embedding model implementation * add LICENSE.meta * fix "hides inherited" warnings * adapt README.md to include the changelog from the original repo * EmbeddingModel not MonoBehaviour * add dependencies to sentis and newtonsoft-json * add meta file for sharp-transformers * enhance third-party notices and add sharp-transformers * embedding model cloeanup * Concat, Split and additional Encode functions * embedding manager based on embedding model * generalise embedder and search * add original csharp implementation of usearch * use namespaces in Unity format * init metadata from path * serialise and store/load index options * add usearch libraries * add meta files * expose load buffer options * save index in zip file * pass name to load * add asmdef for usearch * add usearch to Runtime asmdef * implement ANNSearch * allow different output layers * specify output layer and mean pooling, model cards * add namespace, implement Count method * add namespace * basic dialogue class * add dimensions in the embedding model * add Hamlet search sample * fix formatting * assert num embeddings, no TextToUSearch, insert lock * add metrics * make TensorFloat readable for GPU support * add sample to package.json * add function for list * reorganise and split class functionality * re-implement sample based on re-gorganised classes * batch processing of sentences * rename GetPhrases, remove Clear * key-value based implementation * adapt sample to key-value implementation * virtual and override methods * dialogue filtering, search, and counts * adapt sample * add similarity distances function * add functions for encoded input and output distances * expose distances, search in parallel across threads * remove commented out part * model manager functionality * save and load functionality * add save/load to sample * add saver Utils * add save/load to file * set test folder structure * add EmbeddingModelSkeleton tests * add TestEmbedder.cs meta * add Count method in model manager * tests for EmbeddingModel and ModelManager * remove debug messages * implement embedding dictionary with float[], dot product * add usearch to test asmdef * tests for search classes * time save, load functions * function to retrieve text from indices * tests for SentenceSplitter * iterative search until number of phrases has been reached * Dialogue tests * remove ModelKeySearch for simplicity * remove ModelKeySearch from Dialogue, add Remove function * remove ModelKeySearch from tests * add tests for remove in dialogues * add Remove function in DialogueManager, use string[] instead of List<string> when getting * add tests for dialogue manager * adapt sample to change in Get * move the GetAssetPath to the LLMUnitySetup * add embedding GameObject UI and download model functionality * update sample with the Embedding GameObject * rename Search -> SearchMethods, Dialogue -> SearchEngine, DialogueManager -> Dialogue * change argument order in Add method * always use sentence trimming, delimiters as string, simplify search for up to 1 dialogue part * always use sentence trimming, delimiters as string * adapt tests to delimiters and trimming * set knn to 1 by default, add all sentences of a phrase in a batch * adapt order in add/remve in tests * text interaction with hamlet * search for the samples dir instead of the file * selectable characters, fix content fit * allow quantisation and set it to float16 by default * load only some characters * add embeddings * add embeddings meta * add parameter to allow sync download * sync download function from UndreamAI HF * adapt tests so that the model is downloaded only once * remove debugging * use temp file for download * function to compute md5 hash * equality functions based on the md5 hash of the files * implement without storing model * adapt tests to implementation without storing model * adapt sample to implementation without storing model, cleanup read lines * fix merge * allow to download models only in Editor * move sharp-transformers to ThirdParty folder * move usearch to ThirdParty folder * move hooks to .github folder * gitignore .api and .api.meta files * create embeddings only in editor, select streaming assets embeddings on build * add exit button and explanation text * separate dylib for mac arm * add LICENSE and README with the modification of usearch * add usearch to third-party notices * move around the code * LLMUnityBot sample * Adapt intro for embeddings * Move the multiple AI / remote server in details * add new samples * add text on search * Update README.md * Update README.md * comment out the samples * reset samples and add instructions * add notes on the models * default option 0, name it as download * Update Third Party Notices.md * empty LLMUnityBot prompt * apply properties, expose cpu * set backend everywhere * set AI text to ... * remove embedding content * ignore backend on EmbeddingModel comparison * remove GPU option, serialise field * remove embeddings.zip * fix field not saving * remove Embeddings.zip.meta * remove some characters * store directly to StreamingAssets * remove message about copying embeddings * SetDirty only in UNITY_EDITOR * add only once string * call callback if file exists * model selection in LLM download * add phi-2 licenses * add Phi-2 to README.md * update changelogs * update VERSION --------- Co-authored-by: Thomas Simonini <[email protected]> Co-authored-by: amakropoulos <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactored the startup method for asynchronous operation, introducing a public boolean to toggle this behavior. By default, the boolean is false, ensuring server readiness within
Start()
as initialization occurs inAwake()
. Enabling this boolean switches startup to asynchronous processing, minimizing main thread blockage and preventing Windows from flagging the game as unresponsive.