Skip to content

[Model] Llama model implementation in hidet#243

Merged
yaoyaoding merged 42 commits intohidet-org:mainfrom
Aalanli:llama-model
Jun 7, 2023
Merged

[Model] Llama model implementation in hidet#243
yaoyaoding merged 42 commits intohidet-org:mainfrom
Aalanli:llama-model

Conversation

@Aalanli
Copy link
Copy Markdown
Contributor

@Aalanli Aalanli commented May 23, 2023

Preliminary llama model implementation in hidet.
Changed some imports to make the structure more like torch for convenience.

Verified model loading on a small synthetic model. However, I cannot verify the actual model loading due to memory constraints.

Inference script not included, working on auto translator to move the huggingface infrastructure over from torch.

Copy link
Copy Markdown
Member

@yaoyaoding yaoyaoding left a comment

Choose a reason for hiding this comment

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

Hi @Aalanli,

I hvae taken a rough look and it looks good. One minor concern is that whether we need to add the matmul and cat under the hidet.graph.tensor namespace. I still prefer we directly use the hidet.ops.matmul and hidet.ops.concat instead.

@yaoyaoding
Copy link
Copy Markdown
Member

By the way, I have refactored the structure of hidet.graph.nn. Could you resolve the caused conflicts? Thanks!

@Aalanli
Copy link
Copy Markdown
Contributor Author

Aalanli commented Jun 1, 2023

Just waiting for the graph fusion failure to be addressed, currently generating prompts with no graph optimization works as expected.

@Aalanli
Copy link
Copy Markdown
Contributor Author

Aalanli commented Jun 2, 2023

Waiting for PR#268

@yaoyaoding yaoyaoding changed the title Llama model implementation in hidet [Model] Llama model implementation in hidet Jun 6, 2023
@yaoyaoding yaoyaoding merged commit 260f0ee into hidet-org:main Jun 7, 2023
@yaoyaoding
Copy link
Copy Markdown
Member

Thanks @Aalanli !

@Aalanli Aalanli deleted the llama-model branch June 7, 2023 18:35
@Aalanli Aalanli restored the llama-model branch July 21, 2023 16:47
@Aalanli Aalanli deleted the llama-model branch September 27, 2023 18:09
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