[Core] Modulize prepare input and attention metadata builder (#6596)
This commit is contained in:
@@ -719,6 +719,11 @@ def merge_dicts(dict1: Dict[K, List[T]],
|
||||
return dict(merged_dict)
|
||||
|
||||
|
||||
def flatten_2d_lists(lists: List[List[T]]) -> List[T]:
|
||||
"""Flatten a list of lists to a single list."""
|
||||
return [item for sublist in lists for item in sublist]
|
||||
|
||||
|
||||
def init_cached_hf_modules() -> None:
|
||||
"""
|
||||
Lazy initialization of the Hugging Face modules.
|
||||
|
||||
Reference in New Issue
Block a user