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

[BUG] webui加载模型后,回答全用英文 #35

Closed
2 tasks done
twwch opened this issue Aug 30, 2023 · 6 comments
Closed
2 tasks done

[BUG] webui加载模型后,回答全用英文 #35

twwch opened this issue Aug 30, 2023 · 6 comments

Comments

@twwch
Copy link

twwch commented Aug 30, 2023

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

13525172-f10d-42f1-93b3-84e859538992

webui加载模型后,回答全用英文

期望行为 | Expected Behavior

用中文回答

复现方法 | Steps To Reproduce

generation_config.json

{
  "chat_format":"chatml",
  "do_sample": true,
  "eos_token_id": 151643,
  "max_new_tokens": 512,
  "max_window_size": 6144,
  "pad_token_id": 151643,
  "top_k": 0,
  "top_p": 0.5,
  "transformers_version": "4.31.0"
}

config.json

{
  "_name_or_path": "./",
  "architectures": [
    "QWenLMHeadModel"
  ],
  "attn_dropout_prob": 0.0,
  "auto_map": {
    "AutoConfig": "configuration_qwen.QWenConfig",
    "AutoModelForCausalLM": "modeling_qwen.QWenLMHeadModel"
  },
  "bf16": false,
  "emb_dropout_prob": 0.0,
  "fp16": false,
  "fp32": false,
  "hidden_size": 4096,
  "initializer_range": 0.02,
  "intermediate_size": 22016,
  "kv_channels": 128,
  "layer_norm_epsilon": 1e-06,
  "max_position_embeddings": 8192,
  "model_type": "qwen",
  "no_bias": true,
  "num_attention_heads": 32,
  "num_hidden_layers": 32,
  "onnx_safe": null,
  "rotary_emb_base": 10000,
  "rotary_pct": 1.0,
  "scale_attn_weights": true,
  "seq_length": 2048,
  "tie_word_embeddings": false,
  "tokenizer_type": "QWenTokenizer",
  "torch_dtype": "bfloat16",
  "transformers_version": "4.31.0",
  "use_cache": true,
  "use_dynamic_ntk": true,
  "use_flash_attn": false,
  "use_logn_attn": true,
  "visual": {
    "heads": 16,
    "image_size": 448,
    "image_start_id": 151857,
    "layers": 48,
    "mlp_ratio": 4.9231,
    "output_dim": 4096,
    "patch_size": 14,
    "width": 1664
  },
  "vocab_size": 151936
}

运行环境 | Environment

- OS:ubuntu
- Python:3.9
- Transformers:4.31.0
- PyTorch:2.0.1
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):11.7

备注 | Anything else?

No response

@twwch
Copy link
Author

twwch commented Aug 30, 2023

回答效果也没有demo页面的效果好

@ShuaiBai623
Copy link
Collaborator

可以尝试更小的top p(如0.3/0.4)看看是否有帮助

@twwch
Copy link
Author

twwch commented Aug 30, 2023

可以尝试更小的top p(如0.3/0.4)看看是否有帮助

还是英文回复

@ShuaiBai623
Copy link
Collaborator

我这边重新clone代码测试也没有遇到这种情况,你可以尝试下重新拉下代码

@twwch
Copy link
Author

twwch commented Aug 31, 2023

英文回答的问题解决了,但是效果没有demo好,例如

demo中
image

自行搭建的
image

图片
img_v2_0b4a1860-1d13-4b81-bd79-0abf7830229g

@twwch
Copy link
Author

twwch commented Aug 31, 2023

回答明显是错误的,demo的推理参数能否分享一下

@twwch twwch closed this as completed Sep 2, 2023
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