Luigi commited on
Commit
273acf8
·
1 Parent(s): 0a99dfc

Fix dynamic_shapes kwargs to match inputs structure for AOT compilation

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -501,7 +501,7 @@ def chat_response(user_msg, chat_history, system_prompt,
501
  'inputs_embeds': None,
502
  'use_cache': None,
503
  'cache_position': {1: seq_dim} if 'cache_position' in call.kwargs or 'position_ids' in call.kwargs else None,
504
- 'kwargs': None
505
  }
506
 
507
  exported = torch.export.export(
 
501
  'inputs_embeds': None,
502
  'use_cache': None,
503
  'cache_position': {1: seq_dim} if 'cache_position' in call.kwargs or 'position_ids' in call.kwargs else None,
504
+ 'kwargs': {k: None for k in call.kwargs if k not in ['input_ids', 'attention_mask', 'inputs_embeds', 'use_cache', 'cache_position', 'position_ids']}
505
  }
506
 
507
  exported = torch.export.export(