Code Monkey home page Code Monkey logo

Comments (4)

SivilTaram avatar SivilTaram commented on September 16, 2024

@raywang4 Thanks for your interest on our work! May I know if your problem has been solved?

from lorahub.

raywang4 avatar raywang4 commented on September 16, 2024

@SivilTaram Hi there! Thanks for the reply! I tried with the FLAN 2022 dataset but it still seems like my evaluations are quite off. Would you mind specifying what part of the dataset was used for fine-tuning the lora modules? I read from other issues that a min(10k, data size) samples are selected. Can you let me know which template type was used? Thanks a lot!

from lorahub.

SivilTaram avatar SivilTaram commented on September 16, 2024

@raywang4 Hello! We do not specify the template types, and just try to sample from these datasets using the following code:

from datasets import load_dataset
import os

dataset_folder = "flan_task"

def download_flan():
    dataset = load_dataset("conceptofmind/FLAN_2022", split="train")
    # filter some examples from the dataset
    dataset = dataset.filter(lambda example: example['template_type'] == "zs_noopt", num_proc=32)
    # group the dataset using the task_name
    task_names = dataset.unique("task_name")
    for task_name in task_names:
        print("Processing task: ", task_name)
        # filter the dataset for the current task
        task_dataset = dataset.filter(lambda example: example['task_name'] == task_name, num_proc=32)
        # if the dataset is too large, we randomly sample 10000 examples for the training
        if len(task_dataset) > 10000:
            task_dataset = task_dataset.shuffle()
            task_dataset = task_dataset.select(range(10000))
        # save it into the task file
        task_name = task_name.replace("/", "_")
        task_dataset.to_json(os.path.join(dataset_folder, task_name + ".json"))

if __name__ == "__main__":
    download_flan()

from lorahub.

raywang4 avatar raywang4 commented on September 16, 2024

Thanks for the code! It's very helpful!

from lorahub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.