Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Update python API and reorg scripts #16

Merged
merged 8 commits into from
Dec 27, 2023
Merged

Update python API and reorg scripts #16

merged 8 commits into from
Dec 27, 2023

Conversation

zhenwei-intel
Copy link
Contributor

@zhenwei-intel zhenwei-intel commented Dec 27, 2023

Type of Change

API change

Description

  • update init interface
  • reorg scripts

instead of Automodel.from_pretrained, we change to following init:

model = Model()
model.init(model_name, weight_dtype="int4", compute_dtype="int8")
outputs = model.generate(inputs, streamer=streamer, max_new_tokens=300, do_sample=True)

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

Signed-off-by: zhenwei-intel <[email protected]>
Signed-off-by: zhenwei-intel <[email protected]>
@zhenwei-intel zhenwei-intel changed the title Fix python API Update python API Dec 27, 2023
Signed-off-by: zhenwei-intel <[email protected]>
Signed-off-by: zhenwei-intel <[email protected]>
Signed-off-by: zhenwei-intel <[email protected]>
Signed-off-by: zhenwei-intel <[email protected]>
@zhenwei-intel zhenwei-intel changed the title Update python API Update python API and reorg scripts Dec 27, 2023
Copy link
Contributor

@a32543254 a32543254 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: zhenwei-intel <[email protected]>
@airMeng
Copy link
Contributor

airMeng commented Dec 27, 2023

good to see we finally split scripts tools and python frontend!

Signed-off-by: zhenwei-intel <[email protected]>
@VincyZhang VincyZhang merged commit 40663ec into main Dec 27, 2023
9 checks passed
@zhenwei-intel zhenwei-intel deleted the lzw/fix_pyapi branch December 27, 2023 06:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants