Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 29, 2025

Bumps keras from 3.11.3 to 3.12.0.

Release notes

Sourced from keras's releases.

Keras 3.12.0

Highlights

Keras has a new model distillation API!

You now have access to an easy-to-use API for distilling large models into small models while minimizing performance drop on a reference dataset -- compatible with all existing Keras models. You can specify a range of different distillation losses, or create your own losses. The API supports multiple concurrent distillation losses at the same time.

Example:

# Load a model to distill
teacher = ...
# This is the model we want to distill it into
student = ...
Configure the process
distiller = Distiller(
teacher=teacher,
student=student,
distillation_losses=LogitsDistillation(temperature=3.0),
)
distiller.compile(
optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy']
)
Train the distilled model
distiller.fit(x_train, y_train, epochs=10)

Keras supports GPTQ quantization!

GPTQ is now built into the Keras API. GPTQ is a post-training, weights-only quantization method that compresses a model to int4 layer by layer. For each layer, it uses a second-order method to update weights while minimizing the error on a calibration dataset.

Learn how to use it in this guide.

Example:

model = keras_hub.models.Gemma3CausalLM.from_preset("gemma3_1b")
gptq_config = keras.quantizers.GPTQConfig(
    dataset=calibration_dataset,
    tokenizer=model.preprocessor.tokenizer,
    weight_bits=4,
    group_size=128,
    num_samples=256,
    sequence_length=256,
    hessian_damping=0.01,
    symmetric=False,
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/keras-team/keras/releases)
- [Commits](keras-team/keras@v3.11.3...v3.12.0)

---
updated-dependencies:
- dependency-name: keras
  dependency-version: 3.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Oct 29, 2025
Copy link
Member

@penpornk penpornk left a comment

Choose a reason for hiding this comment

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

The dependencies in this file actually shouldn't be updated. But since this file has been automatically updated a few times already, we'll just keep updating. (Anyone wanting the exact version requirements can always look at the file history.)

copybara-service bot pushed a commit that referenced this pull request Oct 30, 2025
…hmarks/e2e/gemma2/keras

Imported from GitHub PR #33278

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/keras-team/keras/releases">keras's releases</a>.</em></p>
<blockquote>
<h2>Keras 3.12.0</h2>
<h2>Highlights</h2>
<h3>Keras has a new model distillation API!</h3>
<p>You now have access to an easy-to-use API for distilling large models into small models while minimizing performance drop on a reference dataset -- compatible with all existing Keras models. You can specify a range of different distillation losses, or create your own losses. The API supports multiple concurrent distillation losses at the same time.</p>
<p>Example:</p>
<pre lang="python"><code># Load a model to distill
teacher = ...
# This is the model we want to distill it into
student = ...
<h1>Configure the process</h1>
<p>distiller = Distiller(
teacher=teacher,
student=student,
distillation_losses=LogitsDistillation(temperature=3.0),
)
distiller.compile(
optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy']
)</p>
<h1>Train the distilled model</h1>
<p>distiller.fit(x_train, y_train, epochs=10)
</code></pre></p>
<h3>Keras supports GPTQ quantization!</h3>
<p>GPTQ is now built into the Keras API. GPTQ is a post-training, weights-only quantization method that compresses a model to int4 layer by layer. For each layer, it uses a second-order method to update weights while minimizing the error on a calibration dataset.</p>
<p>Learn how to use it <a href="https://keras.io/guides/gptq_quantization_in_keras/">in this guide</a>.</p>
<p>Example:</p>
<pre lang="python"><code>model = keras_hub.models.Gemma3CausalLM.from_preset(&quot;gemma3_1b&quot;)
gptq_config = keras.quantizers.GPTQConfig(
    dataset=calibration_dataset,
    tokenizer=model.preprocessor.tokenizer,
    weight_bits=4,
    group_size=128,
    num_samples=256,
    sequence_length=256,
    hessian_damping=0.01,
    symmetric=False,
&lt;/tr&gt;&lt;/table&gt;
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/keras-team/keras/commit/adbfd13426a0da9864d9a0fcd5be5eed74ca341f"><code>adbfd13</code></a> Add warning to <code>set_backend</code> and more detailed example. (<a href="https://redirect.github.com/keras-team/keras/issues/21787">#21787</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/70598b7903314f7ceace49264de97f1ee91230a8"><code>70598b7</code></a> Fix typo in Distiller docstring</li>
<li><a href="https://github.com/keras-team/keras/commit/eecd34f406709e6ce44c5d94be32d8d81c7fe13d"><code>eecd34f</code></a> Fix: <code>keras.ops.quantile</code> works with tf graph execution (<a href="https://redirect.github.com/keras-team/keras/issues/21782">#21782</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/c2bc6cfcc79d958d2e5a9bc0c829486d5a7fd0ac"><code>c2bc6cf</code></a> Suport keras.op.view() to view the same data bitwise at a new dtype  (<a href="https://redirect.github.com/keras-team/keras/issues/21763">#21763</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/10b51ce5a5054eb9bcddfab405ac9075fb1f1ca7"><code>10b51ce</code></a> Make confusion metrics compilable. (<a href="https://redirect.github.com/keras-team/keras/issues/21775">#21775</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18f79d69c9443b21ac4ac902a5f808237708cdde"><code>18f79d6</code></a> Fix negative index handling in MultiHeadAttention attention_axes (<a href="https://redirect.github.com/keras-team/keras/issues/21721">#21721</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18e0364cbcd1bfe26e43a4986df59bbf758e94a8"><code>18e0364</code></a> Support for extracting volume patches (<a href="https://redirect.github.com/keras-team/keras/issues/21759">#21759</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/dc5e42cca4fc966916552154d2edfb9f9aef3fcf"><code>dc5e42c</code></a> fix sas metrics in jax <code>fit</code> (<a href="https://redirect.github.com/keras-team/keras/issues/21765">#21765</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/1ba3b8f896fbbba30bdcff65483b1dafa356c604"><code>1ba3b8f</code></a> Fix discretization discrepancy (<a href="https://redirect.github.com/keras-team/keras/issues/21769">#21769</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/53987a768def7fb4d6222d5da25484ea4ed76360"><code>53987a7</code></a> Document that <code>set_backend</code> requires re-importing keras. (<a href="https://redirect.github.com/keras-team/keras/issues/21764">#21764</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/keras-team/keras/compare/v3.11.3...v3.12.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=keras&package-manager=pip&previous-version=3.11.3&new-version=3.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/openxla/xla/network/alerts).

</details>
Copybara import of the project:

--
b37d94a by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>:

Bump keras in /xla/backends/cpu/benchmarks/e2e/gemma2/keras

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/keras-team/keras/releases)
- [Commits](keras-team/keras@v3.11.3...v3.12.0)

---
updated-dependencies:
- dependency-name: keras
  dependency-version: 3.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Merging this change closes #33278

FUTURE_COPYBARA_INTEGRATE_REVIEW=#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a
PiperOrigin-RevId: 826026367
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
…hmarks/e2e/gemma2/keras

Imported from GitHub PR openxla/xla#33278

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/keras-team/keras/releases">keras's releases</a>.</em></p>
<blockquote>
<h2>Keras 3.12.0</h2>
<h2>Highlights</h2>
<h3>Keras has a new model distillation API!</h3>
<p>You now have access to an easy-to-use API for distilling large models into small models while minimizing performance drop on a reference dataset -- compatible with all existing Keras models. You can specify a range of different distillation losses, or create your own losses. The API supports multiple concurrent distillation losses at the same time.</p>
<p>Example:</p>
<pre lang="python"><code># Load a model to distill
teacher = ...
# This is the model we want to distill it into
student = ...
<h1>Configure the process</h1>
<p>distiller = Distiller(
teacher=teacher,
student=student,
distillation_losses=LogitsDistillation(temperature=3.0),
)
distiller.compile(
optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy']
)</p>
<h1>Train the distilled model</h1>
<p>distiller.fit(x_train, y_train, epochs=10)
</code></pre></p>
<h3>Keras supports GPTQ quantization!</h3>
<p>GPTQ is now built into the Keras API. GPTQ is a post-training, weights-only quantization method that compresses a model to int4 layer by layer. For each layer, it uses a second-order method to update weights while minimizing the error on a calibration dataset.</p>
<p>Learn how to use it <a href="https://keras.io/guides/gptq_quantization_in_keras/">in this guide</a>.</p>
<p>Example:</p>
<pre lang="python"><code>model = keras_hub.models.Gemma3CausalLM.from_preset(&quot;gemma3_1b&quot;)
gptq_config = keras.quantizers.GPTQConfig(
    dataset=calibration_dataset,
    tokenizer=model.preprocessor.tokenizer,
    weight_bits=4,
    group_size=128,
    num_samples=256,
    sequence_length=256,
    hessian_damping=0.01,
    symmetric=False,
&lt;/tr&gt;&lt;/table&gt;
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/keras-team/keras/commit/adbfd13426a0da9864d9a0fcd5be5eed74ca341f"><code>adbfd13</code></a> Add warning to <code>set_backend</code> and more detailed example. (<a href="https://redirect.github.com/keras-team/keras/issues/21787">#21787</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/70598b7903314f7ceace49264de97f1ee91230a8"><code>70598b7</code></a> Fix typo in Distiller docstring</li>
<li><a href="https://github.com/keras-team/keras/commit/eecd34f406709e6ce44c5d94be32d8d81c7fe13d"><code>eecd34f</code></a> Fix: <code>keras.ops.quantile</code> works with tf graph execution (<a href="https://redirect.github.com/keras-team/keras/issues/21782">#21782</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/c2bc6cfcc79d958d2e5a9bc0c829486d5a7fd0ac"><code>c2bc6cf</code></a> Suport keras.op.view() to view the same data bitwise at a new dtype  (<a href="https://redirect.github.com/keras-team/keras/issues/21763">#21763</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/10b51ce5a5054eb9bcddfab405ac9075fb1f1ca7"><code>10b51ce</code></a> Make confusion metrics compilable. (<a href="https://redirect.github.com/keras-team/keras/issues/21775">#21775</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18f79d69c9443b21ac4ac902a5f808237708cdde"><code>18f79d6</code></a> Fix negative index handling in MultiHeadAttention attention_axes (<a href="https://redirect.github.com/keras-team/keras/issues/21721">#21721</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18e0364cbcd1bfe26e43a4986df59bbf758e94a8"><code>18e0364</code></a> Support for extracting volume patches (<a href="https://redirect.github.com/keras-team/keras/issues/21759">#21759</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/dc5e42cca4fc966916552154d2edfb9f9aef3fcf"><code>dc5e42c</code></a> fix sas metrics in jax <code>fit</code> (<a href="https://redirect.github.com/keras-team/keras/issues/21765">#21765</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/1ba3b8f896fbbba30bdcff65483b1dafa356c604"><code>1ba3b8f</code></a> Fix discretization discrepancy (<a href="https://redirect.github.com/keras-team/keras/issues/21769">#21769</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/53987a768def7fb4d6222d5da25484ea4ed76360"><code>53987a7</code></a> Document that <code>set_backend</code> requires re-importing keras. (<a href="https://redirect.github.com/keras-team/keras/issues/21764">#21764</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/keras-team/keras/compare/v3.11.3...v3.12.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=keras&package-manager=pip&previous-version=3.11.3&new-version=3.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/openxla/xla/network/alerts).

</details>
Copybara import of the project:

--
b37d94a32428d62ed3e73765f4e7b61bc6ed8549 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>:

Bump keras in /xla/backends/cpu/benchmarks/e2e/gemma2/keras

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/keras-team/keras/releases)
- [Commits](keras-team/keras@v3.11.3...v3.12.0)

---
updated-dependencies:
- dependency-name: keras
  dependency-version: 3.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Merging this change closes #33278

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 826026367
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 30, 2025

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 branch October 30, 2025 16:07
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
…ue_ptr<BufferAllocation>>` in DynamicSliceThunk.

`BufferAllocation::Slice` stores a raw pointer to the corresponding `BufferAllocation`. Now we keep the embedded thunk allocations alive by stroing unique_ptrs in the wrapping DynamicSliceThunk. The current design makes it hard to reuse the existing infrastructure, specifically to serialize `DynamicSliceThunk`. To address this, I'm changing fake_allocations to be  `std::vector<BufferAllocation>`.

The move constructor `std::vector::vector(std::vector&&)` is guaranteed to have constant time complexity and therefore it steals the internal data buffer from the source vector. This infers that the pointers to allocations are kept stable as long as:
* we preallocate the vector size
* we never copy the vector, but move

To make it safer for later usage, we can explicitely prohibid BufferAllocation to be  copyable/moveable. I'm going to do this in the following cl.

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 825635601
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
…all the places where we need them all together.

The refactoring uses the well known approach for the compilers.
The positive parts are:
1) we significantly reduce the amount of the boilerplate.
2) we force engineers to use the same names for the ops in all the places.
3) we avoid the errors when someone misses to add a special handling for a new op.

This change introduces `UNARI_OPS_WITHOUT_ACCURACY` and `UNARY_OPS_WITH_ACCURACY` macros in `hlo_opcode.h` to list unary operations. These lists are in use in many places where we work with the unary ops the identical way.

The common cases are:
define a case statement in a switch for every unary op.
define the function definition/declaration for every unary op.
etc.

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 794210068
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 825786647
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 823685699
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 823661932
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 823676717
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 823680002
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 823687804
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
…hmarks/e2e/gemma2/keras

Imported from GitHub PR openxla/xla#33278

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/keras-team/keras/releases">keras's releases</a>.</em></p>
<blockquote>
<h2>Keras 3.12.0</h2>
<h2>Highlights</h2>
<h3>Keras has a new model distillation API!</h3>
<p>You now have access to an easy-to-use API for distilling large models into small models while minimizing performance drop on a reference dataset -- compatible with all existing Keras models. You can specify a range of different distillation losses, or create your own losses. The API supports multiple concurrent distillation losses at the same time.</p>
<p>Example:</p>
<pre lang="python"><code># Load a model to distill
teacher = ...
# This is the model we want to distill it into
student = ...
<h1>Configure the process</h1>
<p>distiller = Distiller(
teacher=teacher,
student=student,
distillation_losses=LogitsDistillation(temperature=3.0),
)
distiller.compile(
optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy']
)</p>
<h1>Train the distilled model</h1>
<p>distiller.fit(x_train, y_train, epochs=10)
</code></pre></p>
<h3>Keras supports GPTQ quantization!</h3>
<p>GPTQ is now built into the Keras API. GPTQ is a post-training, weights-only quantization method that compresses a model to int4 layer by layer. For each layer, it uses a second-order method to update weights while minimizing the error on a calibration dataset.</p>
<p>Learn how to use it <a href="https://keras.io/guides/gptq_quantization_in_keras/">in this guide</a>.</p>
<p>Example:</p>
<pre lang="python"><code>model = keras_hub.models.Gemma3CausalLM.from_preset(&quot;gemma3_1b&quot;)
gptq_config = keras.quantizers.GPTQConfig(
    dataset=calibration_dataset,
    tokenizer=model.preprocessor.tokenizer,
    weight_bits=4,
    group_size=128,
    num_samples=256,
    sequence_length=256,
    hessian_damping=0.01,
    symmetric=False,
&lt;/tr&gt;&lt;/table&gt;
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/keras-team/keras/commit/adbfd13426a0da9864d9a0fcd5be5eed74ca341f"><code>adbfd13</code></a> Add warning to <code>set_backend</code> and more detailed example. (<a href="https://redirect.github.com/keras-team/keras/issues/21787">#21787</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/70598b7903314f7ceace49264de97f1ee91230a8"><code>70598b7</code></a> Fix typo in Distiller docstring</li>
<li><a href="https://github.com/keras-team/keras/commit/eecd34f406709e6ce44c5d94be32d8d81c7fe13d"><code>eecd34f</code></a> Fix: <code>keras.ops.quantile</code> works with tf graph execution (<a href="https://redirect.github.com/keras-team/keras/issues/21782">#21782</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/c2bc6cfcc79d958d2e5a9bc0c829486d5a7fd0ac"><code>c2bc6cf</code></a> Suport keras.op.view() to view the same data bitwise at a new dtype  (<a href="https://redirect.github.com/keras-team/keras/issues/21763">#21763</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/10b51ce5a5054eb9bcddfab405ac9075fb1f1ca7"><code>10b51ce</code></a> Make confusion metrics compilable. (<a href="https://redirect.github.com/keras-team/keras/issues/21775">#21775</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18f79d69c9443b21ac4ac902a5f808237708cdde"><code>18f79d6</code></a> Fix negative index handling in MultiHeadAttention attention_axes (<a href="https://redirect.github.com/keras-team/keras/issues/21721">#21721</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/18e0364cbcd1bfe26e43a4986df59bbf758e94a8"><code>18e0364</code></a> Support for extracting volume patches (<a href="https://redirect.github.com/keras-team/keras/issues/21759">#21759</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/dc5e42cca4fc966916552154d2edfb9f9aef3fcf"><code>dc5e42c</code></a> fix sas metrics in jax <code>fit</code> (<a href="https://redirect.github.com/keras-team/keras/issues/21765">#21765</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/1ba3b8f896fbbba30bdcff65483b1dafa356c604"><code>1ba3b8f</code></a> Fix discretization discrepancy (<a href="https://redirect.github.com/keras-team/keras/issues/21769">#21769</a>)</li>
<li><a href="https://github.com/keras-team/keras/commit/53987a768def7fb4d6222d5da25484ea4ed76360"><code>53987a7</code></a> Document that <code>set_backend</code> requires re-importing keras. (<a href="https://redirect.github.com/keras-team/keras/issues/21764">#21764</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/keras-team/keras/compare/v3.11.3...v3.12.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=keras&package-manager=pip&previous-version=3.11.3&new-version=3.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/openxla/xla/network/alerts).

</details>
Copybara import of the project:

--
b37d94a32428d62ed3e73765f4e7b61bc6ed8549 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>:

Bump keras in /xla/backends/cpu/benchmarks/e2e/gemma2/keras

Bumps [keras](https://github.com/keras-team/keras) from 3.11.3 to 3.12.0.
- [Release notes](https://github.com/keras-team/keras/releases)
- [Commits](keras-team/keras@v3.11.3...v3.12.0)

---
updated-dependencies:
- dependency-name: keras
  dependency-version: 3.12.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Merging this change closes #33278

PiperOrigin-RevId: 826053656
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 825269732
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2025
…er for serialization

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#33278 from openxla:dependabot/pip/xla/backends/cpu/benchmarks/e2e/gemma2/keras/keras-3.12.0 b37d94a32428d62ed3e73765f4e7b61bc6ed8549
PiperOrigin-RevId: 826074509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants