Skip to content

Commit 7735e10

Browse files
authored
Clean up logits in phi3 C++ example (#1134)
1 parent 51829fb commit 7735e10

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

examples/c/src/phi3.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)