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

LazyLLMDataset不支持binpacking,是有什么特殊限制吗? #2846

Open
kehuanfeng opened this issue Jan 3, 2025 · 2 comments
Open

Comments

@kehuanfeng
Copy link

看到LazyLLMDataset没有加packing的支持,请问是有什么考虑吗?

        if args.lazy_tokenize:
            train_dataset = LazyLLMDataset(
                train_dataset, template.encode, strict=args.strict, random_state=args.data_seed)
            if val_dataset is not None and not args.predict_with_generate:
                val_dataset = LazyLLMDataset(
                    val_dataset, template.encode, strict=args.strict, random_state=args.data_seed)
        else:
            preprocessor_cls = PackingPreprocessor if args.packing else EncodePreprocessor
            preprocessor = preprocessor_cls(template=template)
            train_dataset = preprocessor(train_dataset, num_proc=args.dataset_num_proc, strict=args.strict)
            if val_dataset is not None and not args.predict_with_generate:
                val_dataset = preprocessor(val_dataset, num_proc=args.dataset_num_proc, strict=args.strict)
@Jintao-Huang
Copy link
Collaborator

packing会使得len(dataset)的长度减少

你试试用--streaming true

@kehuanfeng
Copy link
Author

packing会使得len(dataset)的长度减少

你试试用--streaming true

streaming+packing有些小问题,解决之后,确实可以工作,但是速度慢很多(可能是因为streaming不支持多路加载的原因)

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

2 participants