Skip to content

Commit 4d400f5

Browse files
cmodi-metafacebook-github-bot
authored andcommitted
Ignore eot_id for Llama3 on output
Differential Revision: D62022863
1 parent acf1b2b commit 4d400f5

File tree

1 file changed

+5
-2
lines changed
  • examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo

1 file changed

+5
-2
lines changed

examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/MainActivity.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ public class MainActivity extends AppCompatActivity implements Runnable, LlamaCa
7373

7474
@Override
7575
public void onResult(String result) {
76-
mResultMessage.appendText(result);
77-
run();
76+
// TODO: remove hardcode specific to llama3 and newer
77+
if(!result.equals("<|eot_id|>")){
78+
mResultMessage.appendText(result);
79+
run();
80+
}
7881
}
7982

8083
@Override

0 commit comments

Comments
 (0)