hestiasky / e4srec Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Dear authors,
Thanks for your nice work! I have already cloned this repo and downloaded the 'Platypus2-70B-instruct' model. However, I encounter (meet) with the following error when running the 'fine-turning.sh':
Traceback (most recent call last):
File "finetune.py", line 245, in <module>
fire.Fire(train)
File "/data/anaconda3/envs/llama/lib/python3.8/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/data/anaconda3/envs/llama/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/data/anaconda3/envs/llama/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "finetune.py", line 118, in train
model = LLM4Rec(
File "/data/baseline/E4SRec/model.py", line 42, in __init__
self.llama_tokenizer.pad_token = 0
File "/data/anaconda3/envs/llama/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 1145, in pad_token
raise ValueError("Cannot set a non-string value as the PAD token")
ValueError: Cannot set a non-string value as the PAD token
It seems like the token cannot be the number.
How to get the user embedding from sequential model using Beauty dataset?
为什么 用data_process.py 生成的文件,和您给出的数据集文件不太一样。
以Beauty为例,
data_process.py 生成的两个文件:
Beauty_neg.txt、Beauty_item2attributes.json
而您在 E4SRec/datasets/sequential/Beauty 给出的
Beauty_item2attributes.json Beauty.txt
为什么?
Hi, your work is very interesting and has been a great source of inspiration to me. As I attempt to replicate the results presented in your paper, I have the following questions:
whe I run preprocess data file, I found there are missed data files
datas = []
# older Amazon
data_flie = '/path/reviews_' + dataset_name + '.json.gz'
# latest Amazon
# data_flie = '/home/hui_wang/data/new_Amazon/' + dataset_name + '.json.gz'
could you provide it?
Dear authors,
Thanks for your nice work! I have already cloned this repo and downloaded the 'Platypus2-7B' model. However, I meet with the following error when running the 'fine-turning.sh':
Traceback (most recent call last): File "finetune.py", line 245, in <module> fire.Fire(train) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "finetune.py", line 172, in train trainer.train(resume_from_checkpoint=resume_from_checkpoint) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/transformers/trainer.py", line 1539, in train return inner_training_loop( File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/transformers/trainer.py", line 1869, in _inner_training_loop tr_loss_step = self.training_step(model, inputs) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/transformers/trainer.py", line 2777, in training_step self.accelerator.backward(loss) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/accelerate/accelerator.py", line 1851, in backward self.scaler.scale(loss).backward(**kwargs) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/_tensor.py", line 492, in backward torch.autograd.backward( File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/autograd/__init__.py", line 251, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/autograd/function.py", line 288, in apply return user_fn(self, *args) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/utils/checkpoint.py", line 288, in backward torch.autograd.backward(outputs_with_grad, args_with_grad) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/autograd/__init__.py", line 251, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/torch/autograd/function.py", line 288, in apply return user_fn(self, *args) File "/home/anaconda3/envs/platypus/lib/python3.8/site-packages/bitsandbytes/autograd/_functions.py", line 480, in backward grad_A = torch.matmul(grad_output, CB).view(ctx.grad_shape).to(ctx.dtype_A) RuntimeError: expected mat1 and mat2 to have the same dtype, but got: c10::Half != float
Dear authors of E4SRec:
I have seen your paper from https://arxiv.org/pdf/2312.02443.pdf, and it specified that your work has been accepted by WWW'24. I am also an author and wonder if the acceptance result of WWW has been settled, could you please share some information about WWW'24 with me? Which is of vital importance for my work arrangement.
你好,请问文章中的baseline的负样本是多少啊?E4SRec采用交叉熵损失,负样本数量是所有候选集,baseline是否选取了所有候选集作为负样本?
I use huggyllama-7b as base model
Target modules [gate_proj, down_proj, up_proj] not found in the base model. Please check the target modules and try again.
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/tuners_utils.py", line 222, in inject_adapter
raise ValueError(
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/tuners_utils.py", line 88, in init
self.inject_adapter(self.model, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/tuners/lora.py", line 274, in init
super().init(model, config, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 111, in init
self.base_model = PEFT_TYPE_TO_MODEL_MAPPING[peft_config.peft_type](
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 1658, in init
super().init(model, peft_config, adapter_name)
File "/usr/local/lib/python3.10/dist-packages/peft/mapping.py", line 106, in get_peft_model
return MODEL_TYPE_TO_PEFT_MODEL_MAPPING[peft_config.task_type](model, peft_config, adapter_name=adapter_name)
File "/data1/E4SRec/model.py", line 39, in init
self.llama_model = get_peft_model(self.llama_model, peft_config)
File "/data1/E4SRec/finetune.py", line 118, in train
model = LLM4Rec(
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/usr/local/lib/python3.10/dist-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/data1/E4SRec/finetune.py", line 245, in
fire.Fire(train)
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
ValueError: Target modules [gate_proj, down_proj, up_proj] not found in the base model. Please check the target modules and try again.
anyone having this issue? I am using single gpu and i tried to decrease the batch size and increase the memory but I haven't fixed it.
/home/user/.local/lib/python3.11/site-packages/torch/distributed/launcher/api.py", line 268, in launch_agent raise ChildFailedError( torch.distributed.elastic.multiprocessing.errors.ChildFailedError: ============================================================
Hi! I am trying to reproduce the results on Yelp.
May I ask what are your hyperparameter settings on Yelp?
Hi! It's great work and thanks for publishing the code.
However, according to the results in your paper, it seems that the performance is much worse than P5 "Recommendation as Language Processing (RLP): A Unified Pretrain, Personalized Prompt & Predict Paradigm (P5)", especially on Yelp (H@5 0.0266 v.s. 0.0574) and Sports (H@5 0.0281 v.s. 0.0387). I have checked that the statistics of the datasets and the evaluation methods are the same in your paper and P5. So, I am really curious about the reason behind the huge performance gap. Is there any difference in design choices or implementations?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.