Open pkr5277 opened 5 months ago
大佬上面版本这个问题解决了。。运行起来提示文件丢失,但是不知道是哪个文件。。。
检查一下是不是有./data/res_csv/sft/sft-my.json
这个文件
这是处理后的数据集
创建了文件可以了,但是报datasets的错, 2.14.3和2.17.1我都试过都报这个错
Downloading data files: 100%|██████████| 1/1 [00:00<?, ?it/s]
Extracting data files: 100%|██████████| 1/1 [00:00<00:00, 166.52it/s]
Generating train split: 0 examples [00:00, ? examples/s]
Traceback (most recent call last):
File "Z:\python program\WeClone\venv\lib\site-packages\datasets\builder.py", line 1949, in _prepare_split_single
num_examples, num_bytes = writer.finalize()
File "Z:\python program\WeClone\venv\lib\site-packages\datasets\arrow_writer.py", line 598, in finalize
raise SchemaInferenceError("Please pass features
or at least one example when writing data")
datasets.arrow_writer.SchemaInferenceError: Please pass features
or at least one example when writing data
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "Z:\python program\WeClone\src\train_sft.py", line 9, in
pt-my.json 我新建了
pt-my.json 是通过通过make_dataset/csv_to_json.py 脚本生成的吗
大佬上面的问题都解决了,请问一下这个api key是什么的,没找到呢
wandb: ERROR api_key not configured (no-tty). call wandb.login(key=[your_api_key])
Traceback (most recent call last):
File "Z:\WeClone\src\train_sft.py", line 9, in
https://github.com/hiyouga/LLaMA-Factory/issues/3530#issuecomment-2087898677 下面几个方法都可以试一下 我应该是没用wandb
itchat的版本是啥 微信绑银行卡了吗
itchat的版本是啥 微信绑银行卡了吗
好使了大佬,确实没有绑定银行卡,谢谢!
大佬能问一下如果想继续训练之前的model应该怎么改?
你试试不改,默认应该会自动读训练过的
你试试不改,默认应该会自动读训练过的
不改继续训练会提示overwrite_output_dir文件夹不为空
在settings.json的train_sft_args 加上overwrite_output_dir为True试试
大佬,有办法给模型输入固定模板吗,就是我问他1,他固定回我2,我训练了这样的数据集,但是还是答非所问
可以试试改src/template.py 的系统提示词 或者把dropout调很小试试
transformers 4.38.1 会报这个错 ImportError: cannot import name 'MixtralBLockSparseTop2MLP' from 'transformers.models.mixtral.modeling_mixtral'
transformers 4.40.1 又会报这个错 ttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'. Did you mean: 'float8_e4m3fn'? Traceback (most recent call last): File "Z:\python program\WeClone\src\train_sft.py", line 1, in from llmtuner import run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtunerinit.py", line 6, in from .train import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\traininit.py", line 1, in from .tuner import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\tuner.py", line 10, in from .dpo import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpoinit.py", line 1, in from .workflow import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo\workflow.py", line 9, in from ...extras.ploting import plot_loss File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\extras\ploting.py", line 6, in from transformers.trainer import TRAINER_STATE_NAME File "Z:\python program\WeClone\venv\lib\site-packages\transformers\trainer.py", line 59, in from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator File "Z:\python program\WeClone\venv\lib\site-packages\transformers\datainit.py", line 27, in from .processors import ( File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processorsinit.py", line 15, in from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\glue.py", line 30, in import tensorflow as tf File "C:\Python310\lib\site-packages\tensorflowinit.py", line 38, in from tensorflow.python.tools import module_util as _module_util File "C:\Python310\lib\site-packages\tensorflow\pythoninit.py", line 42, in from tensorflow.python.saved_model import saved_model File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\saved_model.py", line 20, in from tensorflow.python.saved_model import builder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder.py", line 23, in from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 26, in from tensorflow.python.framework import dtypes File "C:\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py", line 39, in _np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle 想问一下大佬用的哪个版本
请问这个transfomer的问题是怎样解决的
transformers 4.38.1 会报这个错 ImportError: cannot import name 'MixtralBLockSparseTop2MLP' from 'transformers.models.mixtral.modeling_mixtral'
transformers 4.40.1 又会报这个错 ttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'. Did you mean: 'float8_e4m3fn'? Traceback (most recent call last): File "Z:\python program\WeClone\src\train_sft.py", line 1, in from llmtuner import run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtunerinit.py", line 6, in from .train import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\traininit.py", line 1, in from .tuner import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\tuner.py", line 10, in from .dpo import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpoinit.py", line 1, in from .workflow import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo\workflow.py", line 9, in from ...extras.ploting import plot_loss File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\extras\ploting.py", line 6, in from transformers.trainer import TRAINER_STATE_NAME File "Z:\python program\WeClone\venv\lib\site-packages\transformers\trainer.py", line 59, in from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator File "Z:\python program\WeClone\venv\lib\site-packages\transformers\datainit.py", line 27, in from .processors import ( File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processorsinit.py", line 15, in from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\glue.py", line 30, in import tensorflow as tf File "C:\Python310\lib\site-packages\tensorflowinit.py", line 38, in from tensorflow.python.tools import module_util as _module_util File "C:\Python310\lib\site-packages\tensorflow\pythoninit.py", line 42, in from tensorflow.python.saved_model import saved_model File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\saved_model.py", line 20, in from tensorflow.python.saved_model import builder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder.py", line 23, in from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 26, in from tensorflow.python.framework import dtypes File "C:\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py", line 39, in _np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle 想问一下大佬用的哪个版本
所以大佬用的哪个版本呀?我也遇到这个问题了
transformers 4.38.1 会报这个错 ImportError: cannot import name 'MixtralBLockSparseTop2MLP' from 'transformers.models.mixtral.modeling_mixtral' transformers 4.40.1 又会报这个错 ttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'. Did you mean: 'float8_e4m3fn'? Traceback (most recent call last): File "Z:\python program\WeClone\src\train_sft.py", line 1, in from llmtuner import run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtunerinit.py", line 6, in from .train import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\traininit.py", line 1, in from .tuner import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\tuner.py", line 10, in from .dpo import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpoinit.py", line 1, in from .workflow import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo\workflow.py", line 9, in from ...extras.ploting import plot_loss File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\extras\ploting.py", line 6, in from transformers.trainer import TRAINER_STATE_NAME File "Z:\python program\WeClone\venv\lib\site-packages\transformers\trainer.py", line 59, in from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator File "Z:\python program\WeClone\venv\lib\site-packages\transformers\datainit.py", line 27, in from .processors import ( File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processorsinit.py", line 15, in from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\glue.py", line 30, in import tensorflow as tf File "C:\Python310\lib\site-packages\tensorflowinit.py", line 38, in from tensorflow.python.tools import module_util as _module_util File "C:\Python310\lib\site-packages\tensorflow\pythoninit.py", line 42, in from tensorflow.python.saved_model import saved_model File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\saved_model.py", line 20, in from tensorflow.python.saved_model import builder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder.py", line 23, in from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 26, in from tensorflow.python.framework import dtypes File "C:\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py", line 39, in _np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle 想问一下大佬用的哪个版本
所以大佬用的哪个版本呀?我也遇到这个问题了
pip install transformers== 4.38.1 就可以了
transformers 4.38.1 会报这个错 ImportError: cannot import name 'MixtralBLockSparseTop2MLP' from 'transformers.models.mixtral.modeling_mixtral' transformers 4.40.1 又会报这个错 ttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'. Did you mean: 'float8_e4m3fn'? Traceback (most recent call last): File "Z:\python program\WeClone\src\train_sft.py", line 1, in from llmtuner import run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtunerinit.py", line 6, in from .train import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\traininit.py", line 1, in from .tuner import export_model, run_exp File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\tuner.py", line 10, in from .dpo import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpoinit.py", line 1, in from .workflow import run_dpo File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo\workflow.py", line 9, in from ...extras.ploting import plot_loss File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\extras\ploting.py", line 6, in from transformers.trainer import TRAINER_STATE_NAME File "Z:\python program\WeClone\venv\lib\site-packages\transformers\trainer.py", line 59, in from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator File "Z:\python program\WeClone\venv\lib\site-packages\transformers\datainit.py", line 27, in from .processors import ( File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processorsinit.py", line 15, in from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\glue.py", line 30, in import tensorflow as tf File "C:\Python310\lib\site-packages\tensorflowinit.py", line 38, in from tensorflow.python.tools import module_util as _module_util File "C:\Python310\lib\site-packages\tensorflow\pythoninit.py", line 42, in from tensorflow.python.saved_model import saved_model File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\saved_model.py", line 20, in from tensorflow.python.saved_model import builder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder.py", line 23, in from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 26, in from tensorflow.python.framework import dtypes File "C:\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py", line 39, in _np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle 想问一下大佬用的哪个版本
所以大佬用的哪个版本呀?我也遇到这个问题了
我通过pip install trl==0.7.11 accelerate==0.27.2 datasets==2.17.1 transformers==4.38.1
解决了
transformers 4.38.1 会报这个错 ImportError: cannot import name 'MixtralBLockSparseTop2MLP' from 'transformers.models.mixtral.modeling_mixtral'
transformers 4.40.1 又会报这个错 ttributeError: module 'ml_dtypes' has no attribute 'float8_e4m3b11'. Did you mean: 'float8_e4m3fn'? Traceback (most recent call last): File "Z:\python program\WeClone\src\train_sft.py", line 1, in
from llmtuner import run_exp
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner__init.py", line 6, in
from .train import export_model, run_exp
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train__init.py", line 1, in
from .tuner import export_model, run_exp
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\tuner.py", line 10, in
from .dpo import run_dpo
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo__init__.py", line 1, in
from .workflow import run_dpo
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\train\dpo\workflow.py", line 9, in
from ...extras.ploting import plot_loss
File "Z:\python program\WeClone\venv\lib\site-packages\llmtuner\extras\ploting.py", line 6, in
from transformers.trainer import TRAINER_STATE_NAME
File "Z:\python program\WeClone\venv\lib\site-packages\transformers\trainer.py", line 59, in
from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_collator
File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\ init.py", line 27, in
from .processors import (
File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\ init.py", line 15, in
from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
File "Z:\python program\WeClone\venv\lib\site-packages\transformers\data\processors\glue.py", line 30, in
import tensorflow as tf
File "C:\Python310\lib\site-packages\tensorflow\ init__.py", line 38, in
from tensorflow.python.tools import module_util as _module_util
File "C:\Python310\lib\site-packages\tensorflow\python\ init__.py", line 42, in
from tensorflow.python.saved_model import saved_model
File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\saved_model.py", line 20, in
from tensorflow.python.saved_model import builder
File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder.py", line 23, in
from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder
File "C:\Python310\lib\site-packages\tensorflow\python\saved_model\builder_impl.py", line 26, in
from tensorflow.python.framework import dtypes
File "C:\Python310\lib\site-packages\tensorflow\python\framework\dtypes.py", line 39, in
_np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2()
TypeError: Unable to convert function return value to a Python type! The signature was
() -> handle
想问一下大佬用的哪个版本