-
Notifications
You must be signed in to change notification settings - Fork 50
Add support for int64 and bfloat16 types, improve tensor conversion s… #91
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
base: main
Are you sure you want to change the base?
Conversation
| # -------------------------------------------------------------------------- # | ||
| start_time = time.time() | ||
| logits = self(**model_inputs) | ||
| # Ensure computation is complete - sync stream before reading logits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个同步可以去掉
| f" Time per step: decoder {round(sum(time_list[1:]) / (len(time_list) - 1), 2)} token/ms \n", | ||
| ) | ||
|
|
||
| if len(time_list) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(time_list) > 1
| print( | ||
| f"\n\n\n Time per step: prefill {round(time_list[0], 2)} token/ms\n", | ||
| ) | ||
| if len(time_list) > 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删了
| element_size, np_dtype = dtype_info_map.get(infini_tensor_cpu.dtype, (4, np.float32)) | ||
|
|
||
| # Use safer approach: allocate memory first, then copy | ||
| import ctypes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
放到最上面去
…afety
解决天数上推理的问题