RichardWang commited on
Commit
09cc84d
1 Parent(s): c277925
Files changed (2) hide show
  1. configuration_tsp.py +9 -0
  2. pytorch_model.bin +1 -1
configuration_tsp.py CHANGED
@@ -3,6 +3,15 @@ from transformers import PretrainedConfig
3
 
4
  class TSPConfig(PretrainedConfig):
5
  model_type = "tsp"
 
 
 
 
 
 
 
 
 
6
 
7
  def __init__(
8
  self,
 
3
 
4
  class TSPConfig(PretrainedConfig):
5
  model_type = "tsp"
6
+ # Manually set mapping to auto models instead of using `register_for_auto_class`
7
+ # because it can only register the model class that used to execute `push_to_hub`
8
+ auto_map = {
9
+ "AutoModel": "modeling_tsp.TSPModel",
10
+ "AutoModelForPreTraining": "modeling_tsp.TSPModelForPreTraining",
11
+ "AutoModelForTokenClassification": "modeling_tsp.TSPModelForTokenClassification",
12
+ "AutoModelForSequenceClassification": "modeling_tsp.TSPModelForSequenceClassification",
13
+ "AutoModelForQuestionAnswering": "modeling_tsp.TSPModelForQuestionAnswering",
14
+ }
15
 
16
  def __init__(
17
  self,
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec68cb7c934eed76350cc01fec44343220347bd3d42c00b5b253f0d8b7ccee6d
3
  size 69713927
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6fcda66d84b824b881e7b4dca1390b5f2db91d211156994b985138d71dd8ce5
3
  size 69713927