Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
no cuda (#4377)
Browse files Browse the repository at this point in the history
  • Loading branch information
klshuster authored Feb 23, 2022
1 parent 369232d commit 5ce0525
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/blenderbot2/agents/sub_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def __init__(self, opt: Opt):
overrides['beam_size'] = opt.get('query_generator_beam_size', 3)
overrides['beam_min_length'] = opt.get('query_generator_beam_min_length', 2)
overrides['model_parallel'] = opt['model_parallel']
overrides['no_cuda'] = opt['no_cuda']
if self.opt['query_generator_truncate'] > 0:
overrides['text_truncate'] = self.opt['query_generator_truncate']
overrides['truncate'] = self.opt['query_generator_truncate']
Expand Down Expand Up @@ -287,6 +288,7 @@ def __init__(self, opt: Opt):
'beam_size': opt.get('memory_decoder_beam_size', 3),
'beam_min_length': opt.get('memory_decoder_beam_min_length', 10),
'beam_block_ngram': 3,
'no_cuda': opt.get('no_cuda', False),
}
if self.opt.get('memory_decoder_truncate', -1) > 0:
overrides['text_truncate'] = self.opt['memory_decoder_truncate']
Expand Down

0 comments on commit 5ce0525

Please sign in to comment.