Skip to content

Commit

Permalink
update AutoTokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed May 31, 2024
1 parent d0b487e commit a3a402d
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 18 deletions.
3 changes: 1 addition & 2 deletions dpo_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
BloomForCausalLM,
AutoModelForCausalLM,
AutoModel,
LlamaTokenizer,
LlamaForCausalLM,
BloomTokenizerFast,
AutoTokenizer,
Expand All @@ -37,7 +36,7 @@
MODEL_CLASSES = {
"bloom": (AutoConfig, BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoConfig, AutoModel, AutoTokenizer),
"llama": (AutoConfig, LlamaForCausalLM, LlamaTokenizer),
"llama": (AutoConfig, LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoConfig, AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoConfig, AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
3 changes: 1 addition & 2 deletions fastapi_server_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
AutoTokenizer,
BloomForCausalLM,
BloomTokenizerFast,
LlamaTokenizer,
LlamaForCausalLM,
TextIteratorStreamer,
GenerationConfig,
Expand All @@ -42,7 +41,7 @@
MODEL_CLASSES = {
"bloom": (BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoModel, AutoTokenizer),
"llama": (LlamaForCausalLM, LlamaTokenizer),
"llama": (LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
3 changes: 1 addition & 2 deletions gradio_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
AutoModelForCausalLM,
BloomForCausalLM,
BloomTokenizerFast,
LlamaTokenizer,
LlamaForCausalLM,
GenerationConfig,
TextIteratorStreamer,
Expand All @@ -28,7 +27,7 @@
MODEL_CLASSES = {
"bloom": (BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoModel, AutoTokenizer),
"llama": (LlamaForCausalLM, LlamaTokenizer),
"llama": (LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
3 changes: 1 addition & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
AutoTokenizer,
BloomForCausalLM,
BloomTokenizerFast,
LlamaTokenizer,
LlamaForCausalLM,
TextIteratorStreamer,
GenerationConfig,
Expand All @@ -29,7 +28,7 @@
MODEL_CLASSES = {
"bloom": (BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoModel, AutoTokenizer),
"llama": (LlamaForCausalLM, LlamaTokenizer),
"llama": (LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
3 changes: 1 addition & 2 deletions inference_multigpu_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
AutoTokenizer,
BloomForCausalLM,
BloomTokenizerFast,
LlamaTokenizer,
LlamaForCausalLM,
GenerationConfig,
BitsAndBytesConfig,
Expand All @@ -34,7 +33,7 @@
MODEL_CLASSES = {
"bloom": (BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoModel, AutoTokenizer),
"llama": (LlamaForCausalLM, LlamaTokenizer),
"llama": (LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
3 changes: 1 addition & 2 deletions merge_peft_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@
BloomForCausalLM,
BloomTokenizerFast,
AutoModelForCausalLM,
LlamaTokenizer,
LlamaForCausalLM,
AutoModelForSequenceClassification,
)

MODEL_CLASSES = {
"bloom": (BloomForCausalLM, BloomTokenizerFast),
"chatglm": (AutoModel, AutoTokenizer),
"llama": (LlamaForCausalLM, LlamaTokenizer),
"llama": (LlamaForCausalLM, AutoTokenizer),
"baichuan": (AutoModelForCausalLM, AutoTokenizer),
"auto": (AutoModelForCausalLM, AutoTokenizer),
}
Expand Down
1 change: 0 additions & 1 deletion orpo_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
BloomForCausalLM,
AutoModelForCausalLM,
AutoModel,
LlamaTokenizer,
LlamaForCausalLM,
BloomTokenizerFast,
AutoTokenizer,
Expand Down
1 change: 0 additions & 1 deletion ppo_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
BloomForCausalLM,
AutoModelForCausalLM,
AutoModel,
LlamaTokenizer,
LlamaForCausalLM,
BloomTokenizerFast,
AutoTokenizer,
Expand Down
1 change: 0 additions & 1 deletion pretraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
BloomForCausalLM,
AutoModelForCausalLM,
AutoModel,
LlamaTokenizer,
LlamaForCausalLM,
BloomTokenizerFast,
AutoTokenizer,
Expand Down
3 changes: 1 addition & 2 deletions reward_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
PreTrainedTokenizerBase,
BloomForSequenceClassification,
LlamaForSequenceClassification,
LlamaTokenizer,
BloomTokenizerFast,
AlbertForSequenceClassification,
BertForSequenceClassification,
Expand All @@ -44,7 +43,7 @@
"roberta": (AutoConfig, RobertaForSequenceClassification, RobertaTokenizer),
"albert": (AutoConfig, AlbertForSequenceClassification, AutoTokenizer),
"bloom": (AutoConfig, BloomForSequenceClassification, BloomTokenizerFast),
"llama": (AutoConfig, LlamaForSequenceClassification, LlamaTokenizer),
"llama": (AutoConfig, LlamaForSequenceClassification, AutoTokenizer),
"auto": (AutoConfig, AutoModelForSequenceClassification, AutoTokenizer),
}

Expand Down
1 change: 0 additions & 1 deletion supervised_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
BloomForCausalLM,
AutoModel,
AutoModelForCausalLM,
LlamaTokenizer,
LlamaForCausalLM,
BloomTokenizerFast,
AutoTokenizer,
Expand Down

0 comments on commit a3a402d

Please sign in to comment.