You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

sequence_classification_trainer.yaml 1.2 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # In current version, many arguments are not used in pipelines, so,
  2. # a tag `[being used]` will indicate which argument is being used
  3. version: v0.1
  4. framework: pytorch
  5. task: text-classification
  6. model:
  7. path: bert-base-sst2
  8. backbone:
  9. type: bert
  10. prefix: bert
  11. attention_probs_dropout_prob: 0.1
  12. bos_token_id: 0
  13. eos_token_id: 2
  14. hidden_act: elu
  15. hidden_dropout_prob: 0.1
  16. hidden_size: 768
  17. initializer_range: 0.02
  18. intermediate_size: 3072
  19. layer_norm_eps: 1e-05
  20. max_position_embeddings: 514
  21. model_type: roberta
  22. num_attention_heads: 12
  23. num_hidden_layers: 12
  24. pad_token_id: 1
  25. type_vocab_size: 1
  26. vocab_size: 50265
  27. num_classes: 5
  28. col_index: &col_indexs
  29. text_col: 0
  30. label_col: 1
  31. dataset:
  32. train:
  33. <<: *col_indexs
  34. file: ~
  35. valid:
  36. <<: *col_indexs
  37. file: glue/sst2 # [being used]
  38. test:
  39. <<: *col_indexs
  40. file: ~
  41. preprocessor:
  42. type: Tokenize
  43. tokenizer_name: /workspace/bert-base-sst2
  44. train:
  45. batch_size: 256
  46. learning_rate: 0.00001
  47. lr_scheduler_type: cosine
  48. num_steps: 100000
  49. evaluation: # [being used]
  50. model_path: .cache/easynlp/
  51. max_sequence_length: 128
  52. batch_size: 32
  53. metrics:
  54. - accuracy
  55. - f1