Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ai_edge_torch/generative/utilities/litertlm_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ def build_litertlm(

llm_metadata.max_num_tokens = context_length

if (
llm_metadata.llm_model_type
== llm_model_type_pb2.LlmModelType.generic_model
):
mdl_type = llm_metadata.llm_model_type.WhichOneof('model_type')
if not mdl_type or mdl_type == 'generic_model':
match llm_model_type:
case litertlm_builder.LlmModelType.GENERIC:
llm_metadata.llm_model_type.CopyFrom(
Expand Down
Loading