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

Hello, May I ask how I set max_sorce_length and max_target_length proper vaule? #209

Open
JasonLLLLLLLLLLL opened this issue Jan 6, 2024 · 0 comments

Comments

@JasonLLLLLLLLLLL
Copy link

The following is the two args in your code.

    max_source_length: Optional[int] = field(
        default=2048,
        metadata={
            "help": "The maximum total input sequence length after tokenization."
        },
    )
    max_target_length: Optional[int] = field(
        default=2048,
        metadata={
            "help": "The maximum total output sequence length after tokenization."
        },
    )

if I use an example as follows:

    {
        "db_id": "department_management",
        "instruction": "I want you to act as a SQL terminal in front of an example database, you need only to return the sql command to me.Below is an instruction that describes a task, Write a response that appropriately completes the request.\n\"\n##Instruction:\ndepartment_management contains tables such as department, head, management. Table department has columns such as Department_ID, Name, Creation, Ranking, Budget_in_Billions, Num_Employees. Department_ID is the primary key.\nTable head has columns such as head_ID, name, born_state, age. head_ID is the primary key.\nTable management has columns such as department_ID, head_ID, temporary_acting. department_ID is the primary key.\nThe head_ID of management is the foreign key of head_ID of head.\nThe department_ID of management is the foreign key of Department_ID of department.\n\n",
        "input": "###Input:\nList the name, born state and age of the heads of departments ordered by age.\n\n###Response:",
        "output": "SELECT name ,  born_state ,  age FROM head ORDER BY age",
        "history": []
    },

max_source_length = len(instrcution)+len(input)+len(output)?
max_target_length = len(output)?

Here, len means the length of token, Am I right?

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