Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Fix Gemma 2 (#3024)
Daniel Han282ae728621b
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 21ebbfd7f46..c445e98b073 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -12,7 +12,7 @@# See the License for the specific language governing permissions and# limitations under the License.-__version__ = "2025.7.6"+__version__ = "2025.7.7"__all__ = ["SUPPORTS_BFLOAT16",@@ -297,6 +297,12 @@ def patch_mistral_nemo_config(config):return configpass+try:+ # Some Config files use layer_type_validation+ # for eg Gemma-2, so we must import it to stop errors.+ from transformers.configuration_utils import layer_type_validation+except:+ passfrom transformers import __version__ as transformers_versionfrom transformers import PretrainedConfigmodel_architectures = ["llama", "mistral", "gemma", "gemma2", "qwen2", "granite", "qwen3", "qwen3_moe", "falcon_h1"]