-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/cpp baby llama rework (#2903)
* Baby Llama - Porting run.c for integration and fixed clang type conversion errors. Signed-off-by: Shrinath Suresh <[email protected]> Custom preprocess implementation Signed-off-by: Shrinath Suresh <[email protected]> Free memory only after the inference is done Signed-off-by: Shrinath Suresh <[email protected]> Implement Postprocess Signed-off-by: Shrinath Suresh <[email protected]> Setting Fast compiler option Signed-off-by: Shrinath Suresh <[email protected]> Reading checkpoint path and tokenizer path from config file using folly Signed-off-by: Shrinath Suresh <[email protected]> Removing run.c from cmake Signed-off-by: Shrinath Suresh <[email protected]> Replace auto with appropriate data type Signed-off-by: Shrinath Suresh <[email protected]> Using smartpointers and initializing the vector with appropriate size upfront Signed-off-by: Shrinath Suresh <[email protected]> Using smartpointers Signed-off-by: Shrinath Suresh <[email protected]> Directly converting the tensor values to prompt token ids Signed-off-by: Shrinath Suresh <[email protected]> Moving run.c and common variables to .cc file Signed-off-by: Shrinath Suresh <[email protected]> Moving run.c to a separate folder Signed-off-by: Shrinath Suresh <[email protected]> Uncommenting the original run.c main method Signed-off-by: Shrinath Suresh <[email protected]> Implemented destructor to free up resources Signed-off-by: Shrinath Suresh <[email protected]> Supporting files for unit test Signed-off-by: Shrinath Suresh <[email protected]> Processing all the batch inputs Signed-off-by: Shrinath Suresh <[email protected]> Setting InferenceMode guard Signed-off-by: Shrinath Suresh <[email protected]> Updating InferenceMode to use torch::InferenceMode Signed-off-by: Shrinath Suresh <[email protected]> Updating class name to BabyLlamaHandler Signed-off-by: Shrinath Suresh <[email protected]> Renaming llm_handler target to babyllama_handler Signed-off-by: Shrinath Suresh <[email protected]> Adding dummy pt file Signed-off-by: Shrinath Suresh <[email protected]> Typo Fix Signed-off-by: Shrinath Suresh <[email protected]> Calculate tokens/per second for batch input Signed-off-by: Shrinath Suresh <[email protected]> Adding README.md for babyllama example Signed-off-by: Shrinath Suresh <[email protected]> Fixing out-of-bound mem access in babyllama example Move model instance out of ts_backend Use shared_ptr<void> for model to detangle from torchscript Move BaseHAndler to backends/handler Move model instance into core Remove Torchscript as a backend and implement it as a handler Move torchscript test out of backend folder Remove dummy.pt in babyllama + update README + mvoe babyllama test to new examples/examples_test.cc file * fix spell check * Move cpp babyllama example to main example folder * Add last successful location to error message in handle function * Fix babyllama batching by changing input/output from tensor to IValue * rename prompt file * Fix spellcheck --------- Co-authored-by: Shrinath Suresh <[email protected]>
- Loading branch information
1 parent
9e6f1c2
commit 3ecaf0b
Showing
41 changed files
with
1,812 additions
and
470 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.