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

adds mamba model integration with thread model #15

Merged
merged 20 commits into from
Apr 3, 2024

Conversation

jorgeantonio21
Copy link
Contributor

@jorgeantonio21 jorgeantonio21 commented Apr 1, 2024

Depends on PR #12

The  method in  now takes ownership of  by using  instead of , ensuring exclusive access to the thread's state during execution.

Refactor MambaModel to implement run method

The  struct in  now implements the  method of the  trait. The method is refactored to handle input parameters and generate output accordingly. It utilizes the tokenizer to encode the prompt, generates tokens using the model, and constructs the output string based on the generated tokens.

Introduce TokenOutputStream

A new module  is introduced in  to define the  struct. This struct handles tokenization and decoding of model outputs.

Update mod.rs to include token_output_stream

The  file in the  module is updated to include the  module, enabling access to the  struct.

Update service.rs to use mutable reference in run method

The  method of the  struct in  is updated to take a mutable reference to , ensuring that it can modify the internal state if necessary.
@jorgeantonio21 jorgeantonio21 self-assigned this Apr 1, 2024
atoma-inference/src/apis/hugging_face.rs Outdated Show resolved Hide resolved
atoma-inference/src/main.rs Outdated Show resolved Hide resolved
atoma-inference/src/model_thread.rs Outdated Show resolved Hide resolved
atoma-inference/src/models/candle/mamba.rs Outdated Show resolved Hide resolved
atoma-inference/src/model_thread.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@Cifko Cifko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

atoma-inference/src/models/config.rs Show resolved Hide resolved
atoma-inference/src/models/config.rs Outdated Show resolved Hide resolved
@jorgeantonio21 jorgeantonio21 merged commit eff8f1a into main Apr 3, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants