File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -164,19 +164,6 @@ void CXX_API(const char* model_path) {
164164 is_first_token = false ;
165165 }
166166
167- // Show usage of GetOutput
168- std::unique_ptr<OgaTensor> output_logits = generator->GetOutput (" logits" );
169-
170- // Assuming output_logits.Type() is float as it's logits
171- // Assuming shape is 1 dimensional with shape[0] being the size
172- auto logits = reinterpret_cast <float *>(output_logits->Data ());
173-
174- // Print out the logits using the following snippet, if needed
175- // auto shape = output_logits->Shape();
176- // for (size_t i=0; i < shape[0]; i++)
177- // std::cout << logits[i] << " ";
178- // std::cout << std::endl;
179-
180167 const auto num_tokens = generator->GetSequenceCount (0 );
181168 const auto new_token = generator->GetSequenceData (0 )[num_tokens - 1 ];
182169 std::cout << tokenizer_stream->Decode (new_token) << std::flush;
You can’t perform that action at this time.
0 commit comments