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

support left padding and prefix post-processing for models like chatglm #184

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

loubnabnl
Copy link
Collaborator

@loubnabnl loubnabnl commented Jan 18, 2024

fixes #182
ChatGLM3-6B requires left padding which wasn't supported in the harness, you need to add --left_padding flag to force it.

accelerate launch main.py \
    --model THUDM/chatglm3-6b \
    --tasks humaneval \
    --n_samples 1 \
    --batch_size 1 \
    --allow_code_execution \
    --use_auth_token \
    --do_sample False \
    --precision fp16 \
    --trust_remote_code \
    --save_generations \
    --left_padding

output

{
  "humaneval": {
    "pass@1": 0.29878048780487804
  },
  "config": {
    "prefix": "",
    "do_sample": false,
    "temperature": 0.2,
    "top_k": 0,
    "top_p": 0.95,
    "n_samples": 1,
    "eos": "<|endoftext|>",
    "seed": 0,
    "model": "THUDM/chatglm3-6b",
    "modeltype": "causal",
    "peft_model": null,
    "revision": null,
    "use_auth_token": true,
    "trust_remote_code": true,
    "tasks": "humaneval",
    "instruction_tokens": null,
    "batch_size": 1,
    "max_length_generation": 512,
    "precision": "fp16",
    "load_in_8bit": false,
    "load_in_4bit": false,
    "left_padding": true,
    "limit": null,
    "limit_start": 0,
    "save_every_k_tasks": -1,
    "postprocess": true,
    "allow_code_execution": true,
    "generation_only": false,
    "load_generations_path": null,
    "load_data_path": null,
    "metric_output_path": "evaluation_results.json",
    "save_generations": true,
    "load_generations_intermediate_paths": null,
    "save_generations_path": "generations.json",
    "save_references": false,
    "save_references_path": "references.json",
    "prompt": "prompt",
    "max_memory_per_gpu": null,
    "check_references": false
  }
}

@loubnabnl loubnabnl merged commit 3910745 into main Jan 19, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

errors when ran THUDM/chatglm3-6b on this project
2 participants