Skip to content

decoder may have some bug #733

@lichen914

Description

@lichen914

this is something wrong when using GPTBigCodeForCausalLM model in decoder,while using greedy method.

basemodel

starcoderbase-15b huggingface

prompt:

/**\n * Write typescript function to find the minimum cost path to reach (m, n) from (0, 0) for the given cost matrix cost[][] and a position (m, n) in cost[][].\n * \n * Examples:\n * >>> min_cost([[1, 2, 3], [4, 8, 2], [1, 5, 3]], 2, 2)\n * >>> 8\n * >>> min_cost([[2, 3, 4], [5, 9, 3], [2, 6, 4]], 2, 2)\n * >>> 12\n * >>> min_cost([[3, 4, 5], [6, 10, 4], [3, 7, 5]], 2, 2)\n * >>> 16\n */\nconst min_cost = function (cost: Array<Array<number>>, m: number, n: number) : number {\n

vllm generate result:

\t>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

greedy config

sampling_params = SamplingParams( temperature=0, max_tokens=512 )

huggingface generate result:

function minCost(cost: number[][], m: number, n: number): number { let min = cost[0][0]; for (let i = 0; i < m; i++) { for (let j = 0; j < n; j++) { if (i === 0 && j === 0) { continue; } if (cost[i][j] < min) { min = cost[i][j]; } } } return min; }

the greedy config

generation_config = GenerationConfig( temperature=0, max_new_tokens=512, pad_token_id=0 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions