lorax icon indicating copy to clipboard operation
lorax copied to clipboard

AutoTokenzier.from_pretrains needs setting with `trust_remote_code` inside `load_module_map`

Open thincal opened this issue 1 year ago • 2 comments

System Info

lorax main

Information

  • [X] Docker
  • [ ] The CLI directly

Tasks

  • [ ] An officially supported command
  • [ ] My own modifications

Reproduction

  1. using a tokenizer class not registered in the Transformers
  2. place the tokenizer config file and related files inside the adapter checkpoint folder
  3. inference with adapter info pointed to this adapter folder
  4. the tokenizer loading will go into the resolve_trust_remote_code logic inside the Transformers, where it will require user input to confirm if trust_remote_code is not True.

Expected behavior

loading the tokenizer directly if it is existed inside adapter.

thincal avatar May 13 '24 15:05 thincal

The fix is easy, will prepare a PR for review soon.

thincal avatar May 13 '24 15:05 thincal

Thanks @thincal!

tgaddair avatar May 14 '24 04:05 tgaddair