LxMLS / lxmls-toolkit

Machine Learning applied to Natural Language Processing Toolkit used in the Lisbon Machine Learning Summer School
Other
222 stars 216 forks source link

Fixing assert. Moving functions to class. Deterministic prompting. #183

Closed venelink closed 1 year ago

venelink commented 1 year ago

Fixed and tested the assert on various versions of transformers.

Moved the function from prompting from notebook to the object (students don't need to see/touch that) -> new function model.prompt()

Added greedy deterministic topK function for prompting (model.generate_batch() and its human-readable wrapped version model.prompt_topK() )

Cleaned the generation notebook to the absolute minimum code.

Tested deterministic performance of pooling prompting (using set_seed) and of deterministic greedy prompting.