Skip to main content

BERT for TensorFlow 2.11.0

This is a modification version of the original bert-for-tf2 created by kpe. I made a minor change to the code to make it work with never version of TensorFlow, following the solution that i found in github community. Resolving the TypeError issue. Last time checked at 1/23/2023 - it worked fine.

This repo contains a TensorFlow 2.11.0_ Keras_ implementation of google-research/bert_ with support for loading of the original pre-trained weights_, and producing activations numerically identical to the one calculated by the original model.

ALBERT_ and adapter-BERT_ are also supported by setting the corresponding configuration parameters (shared_layer=True, embedding_size for ALBERT_ and adapter_size for adapter-BERT_). Setting both will result in an adapter-ALBERT by sharing the BERT parameters across all layers while adapting every layer with layer specific adapter.

The implementation is build from scratch using only basic tensorflow operations, following the code in google-research/bert/modeling.py_ (but skipping dead code and applying some simplifications). It also utilizes kpe/params-flow_ to reduce common Keras boilerplate code (related to passing model and layer configuration arguments).

bert-for-tf2e_ should work with both TensorFlow 2.11.0_ and TensorFlow 1.14_ or newer.

Install

bert-for-tf2e bert for tensorflow 2.0 (extended) is on the Python Package Index (PyPI):

::

pip install bert-for-tf2e

For more detail please check the original version:

Metadata

Release files for bert-for-tf2e 0.14.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for bert-for-tf2e 0.14.13
File Interpreter ABI Platform Actions
bert_for_tf2e-0.14.13-py3-none-any.whl Python 3 none any Details for bert_for_tf2e-0.14.13-py3-none-any.whl

Release files / bert_for_tf2e-0.14.13-py3-none-any.whl

Download URL bert_for_tf2e-0.14.13-py3-none-any.whl
Size 48.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50c92a69fcf0147bcb0e3f4327397000c69ebb38a50fd85b8be03c37ee419137
BLAKE2b-256 checksum
How to use checksums
490d88c29004e79a1727d38a8a5df6df238748f4a7b9130e37681a38c8321afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for bert-for-tf2e 0.14.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.13 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page