Skip to content

Phi 3 Android app Update #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 30, 2024
Merged

Phi 3 Android app Update #465

merged 6 commits into from
Sep 30, 2024

Conversation

vraspar
Copy link
Contributor

@vraspar vraspar commented Sep 24, 2024

Update Phi-3 Android app

  • allow changing maximum response length and penalty length
  • Add Text View to show download status
  • Add logs to measure token generation time

private static final String TAG = "genai.demo.MainActivity";
private int maxLength = 100;
private int lengthPenalty = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to this doco the default for length penalty is 1, with values < 1 encouraging shorter responses and > 1 longer. Is that doco out of date? Or if not, should this be a float and start at 1.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add info on the new configuration params and a link to the genai doco for them? 'length penalty' is somewhat obtuse.

Comment on lines 172 to 173
Log.i(TAG, "Prompt processing time (first token): " + (firstTokenTime - startTime)/ 1000.0 + " seconds");
Log.i(TAG, "Tokens generated per second (excluding prompt processing): " + 1000 * ((numTokens -1) / totalTime));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be much work to add a setting for 'display timing' and if true we add this info at the end of the response that is displayed to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added small pop up that shows the rates after prompt generation is done

@vraspar vraspar merged commit 009920d into main Sep 30, 2024
22 of 24 checks passed
@vraspar vraspar deleted the vraspar/phi-3-android branch September 30, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants