mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-07-21 10:15:53 +00:00
TP: fix Phi3, Bert, Plamo2/3, ChatGLM (#25536)
This commit is contained in:
@@ -40,8 +40,10 @@ static double nmse(const std::vector<float> & a, const std::vector<float> & b) {
|
||||
}
|
||||
|
||||
static void set_tensor_data(struct ggml_tensor * tensor, void * userdata) {
|
||||
size_t seed = *(const size_t *) userdata;
|
||||
std::hash<std::string> hasher;
|
||||
std::mt19937 gen(hasher(tensor->name) + *(const size_t *) userdata);
|
||||
seed ^= hasher(tensor->name);
|
||||
std::mt19937 gen(seed);
|
||||
std::normal_distribution<float> dis(0.0f, 1.0e-2f);
|
||||
|
||||
const int64_t ne = ggml_nelements(tensor);
|
||||
|
||||
Reference in New Issue
Block a user