--bert_model
Switch
--add_bert
Description
Adds a BERT feature table.
Argument and Default Value
No argument. Boolean switch, default: False.
Details
Aliases: --emb_model (--add_embedding, --add_emb_feat). Extracts contextual embedding features for every message using a Huggingface Transformer model (BERT by default) and aggregates them into a feature table, one row per group.
By default this uses bert-base-uncased (--bert_model), the mean of the second-to-last layer (--bert_layers), and mean word/message aggregation (--bert_msg_aggregation). Use --batch_size (default 32) to change how many messages are embedded per GPU batch.
Other Switches
Required Switches:
Optional Switches:
Example Commands
Creates a default BERT feature table.
dlatkInterface.py -d dla_tutorial -t msgs -c user_id --add_bert