NicholasYangAI
Results
1
issues of
NicholasYangAI
在使用同样的prompt,topk=1的情况下,使用Baichuan-13B-Base模型推理出来的结果差异较大。 例如以下测试代码: ` def test_correct_hf(dtype=torch.float32): print("dtype is ", dtype) random.seed(42) np.random.seed(42) torch.manual_seed(42) tokenizer = BaichuanTokenizer.from_pretrained(model_path, use_fast=False, padding_side='left', torch_dtype=dtype, trust_remote_code=True) model = BaichuanForCausalLM.from_pretrained(model_path, device_map="auto", torch_dtype=dtype,trust_remote_code=True) inputs = tokenizer(["请介绍一下深圳市"], return_tensors="pt", padding=True).to("cuda") generate_ids...