Skip to content

Commit

Permalink
Revert "Test debug"
Browse files Browse the repository at this point in the history
This reverts commit 2617267.
  • Loading branch information
RyanUnderhill committed Oct 22, 2024
1 parent 2617267 commit e70e3c9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/c_api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,13 @@ struct Phi2Test {
void Run() {
// Low level loop
{
std::cout << "Creating generator..." << std::endl;

auto generator = OgaGenerator::Create(*model_, *params_);

std::cout << "Generation loop..." << std::endl;

while (!generator->IsDone()) {
generator->ComputeLogits();
generator->GenerateNextToken();
}

std::cout << "Decode one at a time" << std::endl;

// Decode One at a time
for (size_t i = 0; i < 3; i++) {
auto out_string = tokenizer_->Decode(generator->GetSequenceData(i), generator->GetSequenceCount(i));
Expand All @@ -329,12 +323,8 @@ struct Phi2Test {

// High level
{
std::cout << "High level generate" << std::endl;

auto output_sequences = model_->Generate(*params_);

std::cout << "Decode the batch" << std::endl;

// Decode The Batch
for (size_t i = 0; i < output_sequences->Count(); i++) {
auto out_string = tokenizer_->Decode(output_sequences->SequenceData(i), output_sequences->SequenceCount(i));
Expand Down

0 comments on commit e70e3c9

Please sign in to comment.