MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / PrintProto

Function PrintProto

external/sentencepiece/src/spec_parser.h:113–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 os << " " << #param_name << ": " << it->second << "\n";
112
113inline std::string PrintProto(const TrainerSpec &message,
114 absl::string_view name) {
115 std::ostringstream os;
116
117 os << name << " {\n";
118
119 PRINT_REPEATED_STRING(input);
120 PRINT_PARAM(input_format);
121 PRINT_PARAM(model_prefix);
122
123 static const std::map<TrainerSpec::ModelType, std::string> kModelType_Map = {
124 {TrainerSpec::UNIGRAM, "UNIGRAM"},
125 {TrainerSpec::BPE, "BPE"},
126 {TrainerSpec::WORD, "WORD"},
127 {TrainerSpec::CHAR, "CHAR"},
128 };
129
130 PRINT_ENUM(model_type, kModelType_Map);
131 PRINT_PARAM(vocab_size);
132 PRINT_REPEATED_STRING(accept_language);
133 PRINT_PARAM(self_test_sample_size);
134 PRINT_PARAM(character_coverage);
135 PRINT_PARAM(input_sentence_size);
136 PRINT_PARAM(shuffle_input_sentence);
137 PRINT_PARAM(seed_sentencepiece_size);
138 PRINT_PARAM(shrinking_factor);
139 PRINT_PARAM(max_sentence_length);
140 PRINT_PARAM(num_threads);
141 PRINT_PARAM(num_sub_iterations);
142 PRINT_PARAM(max_sentencepiece_length);
143 PRINT_PARAM(split_by_unicode_script);
144 PRINT_PARAM(split_by_number);
145 PRINT_PARAM(split_by_whitespace);
146 PRINT_PARAM(split_digits);
147 PRINT_PARAM(pretokenization_delimiter);
148 PRINT_PARAM(treat_whitespace_as_suffix);
149 PRINT_PARAM(allow_whitespace_only_pieces);
150 PRINT_REPEATED_STRING(control_symbols);
151 PRINT_REPEATED_STRING(user_defined_symbols);
152 PRINT_PARAM(required_chars);
153 PRINT_PARAM(byte_fallback);
154 PRINT_PARAM(vocabulary_output_piece_score);
155 PRINT_PARAM(train_extremely_large_corpus);
156 PRINT_PARAM(seed_sentencepieces_file);
157 PRINT_PARAM(hard_vocab_limit);
158 PRINT_PARAM(use_all_vocab);
159 PRINT_PARAM(unk_id);
160 PRINT_PARAM(bos_id);
161 PRINT_PARAM(eos_id);
162 PRINT_PARAM(pad_id);
163 PRINT_PARAM(unk_piece);
164 PRINT_PARAM(bos_piece);
165 PRINT_PARAM(eos_piece);
166 PRINT_PARAM(pad_piece);
167 PRINT_PARAM(unk_surface);
168 PRINT_PARAM(enable_differential_privacy);
169 PRINT_PARAM(differential_privacy_noise_level);
170 PRINT_PARAM(differential_privacy_clipping_threshold);

Callers 1

TrainMethod · 0.85

Calls 1

strMethod · 0.80

Tested by

no test coverage detected