Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding error!! #2027

Open
AheadSnail opened this issue Oct 11, 2024 · 0 comments
Open

Coding error!! #2027

AheadSnail opened this issue Oct 11, 2024 · 0 comments

Comments

@AheadSnail
Copy link

I want to complete the distillation of text similarity using the following script。

python run_glue_no_trainer_distillation.py
--max_seq_length 128 --model_name_or_path ./student_model
--teacher_model_name_or_path BAAI/bge-small-zh-v1.5 --do_distillation
--per_device_train_batch_size 16 --learning_rate 1e-5 --num_train_epochs 1
--output_dir ./output_dir --loss_weights 0 1
--train_file ./train_data/dda-train.json
--temperature 2 --seed 5143

The student model here is local, and then I want to load the local data set, so the corresponding task_name is not set.
The following is the wrong information

Traceback (most recent call last):
File "/Users/jasonth/MyWork/AI/neural-compressor/examples/pytorch/nlp/huggingface_models/text-classification/distillation/eager/run_glue_no_trainer_distillation.py", line 708, in
main()
File "/Users/jasonth/MyWork/AI/neural-compressor/examples/pytorch/nlp/huggingface_models/text-classification/distillation/eager/run_glue_no_trainer_distillation.py", line 326, in main
is_regression = datasets["train"].features["label"].dtype in ["float32", "float64"]
TypeError: 'module' object is not subscriptable

is_regression = datasets["train"].features["label"].dtype in ["float32", "float64"]
Should the datasets in this code be changed to raw_datasets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant