Skip to content

Commit

Permalink
fixing doc q/a
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoern committed Nov 7, 2023
1 parent f4b7509 commit ba3193d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atman-magma/example_document_qa_sentence_level_explain.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

document_explainer = DocumentQAExplainer(
model,
explanation_delimiter = '\n', ## for now max len = 1 token (todo: add support for longer delimiters)
explanation_delimiters = ['\n'], ## for now max len = 1 token (todo: add support for longer delimiters)
device = 'cuda:0',
suppression_factor = 0.0, ## suppression_factor = 0.0 -> completely erases one chunk at a time
document = DOCUMENT
Expand All @@ -76,3 +76,4 @@
## save as json or print
postprocessed_output = document_explainer.postprocess(output)
postprocessed_output.save_as(filename = 'explanation.json')
print('explanation.json')

0 comments on commit ba3193d

Please sign in to comment.