Skip to content

Conversation

@IgorSwat
Copy link
Contributor

Description

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

Copy link
Contributor

@chmjkb chmjkb left a comment

Choose a reason for hiding this comment

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

Code looks good, left some small questions, good job 👏🏻
I'll test if things work today and we can merge

// A simple llama2 sampler.

template <typename T> struct ProbIndex {
template <typename T> struct ET_EXPERIMENTAL ProbIndex {
Copy link
Contributor

@chmjkb chmjkb Nov 28, 2025

Choose a reason for hiding this comment

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

Can we get rid of the ET_EXPERIMENTAL macros (or find a way to avoid compiler warnings for this)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we getting rid of the portable kernels?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's no longer being produced by the ExecuTorch iOS build. I believe it's now replaced by libkernels_llm_ios.a.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this included in the Android build as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - Android libs are built with the same setup as iOS ones, so the resulting libs should contain the same content.

Copy link
Member

@msluszniak msluszniak left a comment

Choose a reason for hiding this comment

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

I guess that all the files from runner and third-party dirs are copied so no improvements wanted / needed. Are there any other cpp files than in common/rnexecutorch to check? If not, please make sure that someone will test this PR, unfortunately I don't have time to do this.

Comment on lines -33 to -38

// A typical input for parallel processing in exported LLM model consists of 2
// tensors of shapes [1, N] and [1], where N is the number of tokens. Hovewer,
// some exported models require inputs of shapes [1, N] and [N], which needs
// to be marked before using LLM runner.
bool extended_input_mode_ = false;
Copy link
Member

Choose a reason for hiding this comment

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

Why this is removed, is it not needed anymore for Gemma?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ExecuTorch 1.0 introduces its own implementation of this mechanism with the new TextDecoderRunner and specifically populate_start_pos_or_cache_position() function, so our extra code is no longer needed.

@chmjkb
Copy link
Contributor

chmjkb commented Nov 28, 2025

I tested example apps and it looks good to me, are pytorch tokenizers included in this binary?

@IgorSwat
Copy link
Contributor Author

IgorSwat commented Dec 1, 2025

I tested example apps and it looks good to me, are pytorch tokenizers included in this binary?

No, we use tokenizers-cpp as for now. I strongly believe that switching to pytorch tokenizers should be a separate task, since it's not a critical issue for now, and I suspect it might not be as straightforward as it seems to be.

@chmjkb chmjkb merged commit cd2f5d0 into main Dec 1, 2025
4 checks passed
@chmjkb chmjkb deleted the build-with-executorch-1.0 branch December 1, 2025 09:09
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.

4 participants