mirror of https://github.com/google/gemma.cpp.git
Minor: mark command line flags as required
PiperOrigin-RevId: 757775369
This commit is contained in:
parent
252a4e955e
commit
cf7dd80c17
|
|
@ -263,14 +263,6 @@ TEST_F(GemmaTest, CrossEntropySmall) {
|
|||
float entropy = s_env->CrossEntropy(kSmall);
|
||||
fprintf(stderr, "per-token entropy: %f\n", entropy);
|
||||
switch (config.model) {
|
||||
case gcpp::Model::GEMMA_2B:
|
||||
// 2B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 2.6f, 0.2f);
|
||||
break;
|
||||
case gcpp::Model::GEMMA_7B:
|
||||
// 7B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 2.8f, 0.2f);
|
||||
break;
|
||||
case gcpp::Model::GRIFFIN_2B:
|
||||
EXPECT_NEAR(entropy, 2.61f, 0.02f);
|
||||
break;
|
||||
|
|
@ -295,14 +287,6 @@ TEST_F(GemmaTest, CrossEntropyJingleBells) {
|
|||
float entropy = s_env->CrossEntropy(kJingleBells);
|
||||
fprintf(stderr, "per-token entropy: %f\n", entropy);
|
||||
switch (config.model) {
|
||||
case gcpp::Model::GEMMA_2B:
|
||||
// 2B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 1.9f, 0.2f);
|
||||
break;
|
||||
case gcpp::Model::GEMMA_7B:
|
||||
// 7B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 1.07f, 0.05f);
|
||||
break;
|
||||
case gcpp::Model::GRIFFIN_2B:
|
||||
EXPECT_NEAR(entropy, 1.62f, 0.02f);
|
||||
break;
|
||||
|
|
@ -327,14 +311,6 @@ TEST_F(GemmaTest, CrossEntropyGettysburg) {
|
|||
float entropy = s_env->CrossEntropy(kGettysburg);
|
||||
fprintf(stderr, "per-token entropy: %f\n", entropy);
|
||||
switch (config.model) {
|
||||
case gcpp::Model::GEMMA_2B:
|
||||
// 2B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 1.1f, 0.1f);
|
||||
break;
|
||||
case gcpp::Model::GEMMA_7B:
|
||||
// 7B v.1 and v.1.1 produce slightly different results.
|
||||
EXPECT_NEAR(entropy, 0.75f, 0.1f);
|
||||
break;
|
||||
case gcpp::Model::GRIFFIN_2B:
|
||||
EXPECT_NEAR(entropy, 0.71f, 0.02f);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -520,14 +520,16 @@ def export_paligemma_sbs(
|
|||
|
||||
_MODEL_SPECIFIER = flags.DEFINE_string(
|
||||
"model_specifier",
|
||||
"",
|
||||
None,
|
||||
"String specifying model, size, weight, wrapping (ModelConfig.Specifier)",
|
||||
required=True,
|
||||
)
|
||||
|
||||
_LOAD_PATH = flags.DEFINE_string(
|
||||
"load_path",
|
||||
"",
|
||||
None,
|
||||
"Path to the safetensors index.json file to read",
|
||||
required=True,
|
||||
)
|
||||
_TOKENIZER_FILE = flags.DEFINE_string(
|
||||
"tokenizer_file",
|
||||
|
|
|
|||
Loading…
Reference in New Issue