--emb_class

Switch

--emb_class {bert,XLNet,Roberta,GPT2,DistilBert,XLMRoberta,Albert,auto,None}

Description

Contextual embedding model class to use when extracting features with --bert_model/--emb_model, for models not in DLATK's built-in shorthand list.

Argument and Default Value

One of the listed choices (argparse choices). Default: None (DLATK looks up fwflag_embedding_model in its internal SHORTHAND_DICT instead).

Details

Verified end-to-end: with an arbitrary Hugging Face model name not in DLATK's shorthand list (e.g. prajjwal1/bert-tiny), omitting --emb_class fails immediately with KeyError: 'prajjwal1/bert-tiny' (the shorthand lookup). Passing --emb_class auto (together with --tokenizer_model) routes through Hugging Face's Auto* classes instead and works correctly — confirmed producing real embedding features.

Other Switches

Required Switches:

Example Commands

dlatkInterface.py -d dla_tutorial -t msgs -c user_id --add_bert \
--embedding_model prajjwal1/bert-tiny --emb_class auto --tokenizer_model prajjwal1/bert-tiny