Gemma 3n هو نموذج ذكاء اصطناعي توليدي محسَّن للاستخدام في الأجهزة اليومية، مثل
الهواتف المحمولة وأجهزة الكمبيوتر المحمول والأجهزة اللوحية. يتضمّن هذا النموذج ابتكارات في
المعالجة الفعّالة للمَعلمات، بما في ذلك ميزة "التضمين لكل طبقة" (PLE) لميزة
التخزين المؤقت للمَعلمات وبنية نموذج MatFormer التي توفّر المرونة اللازمة لمحاولة
تقليل متطلبات الحوسبة والذاكرة. تتعامل هذه النماذج مع الإدخال الصوتي، بالإضافة إلى البيانات النصية والمرئية.
تتضمّن Gemma 3n الميزات الرئيسية التالية:
إدخال الصوت: معالجة بيانات الصوت للتعرّف على الكلام والترجمة
وتحليل بيانات الصوت
مزيد من المعلومات
الإدخال المرئي والنصوص: تتيح لك إمكانات الوسائط المتعددة التعامل مع الرؤية والصوت والنص لمساعدتك في فهم العالم من حولك وتحليله.
مزيد من المعلومات
برنامج ترميز الرؤية: يعمل برنامج ترميز MobileNet-V5 العالي الأداء على
تحسين سرعة ودقة معالجة البيانات المرئية بشكل كبير.
مزيد من المعلومات
التخزين المؤقت لمَعلمات PLE: يمكن تخزين مَعلمات PLE (التضمين حسب الطبقة) المضمّنة في هذه
النماذج مؤقتًا في مساحة تخزين محلية سريعة لتقليل التكاليف المتعلّقة بتشغيل
الذاكرة في النموذج. مزيد من المعلومات
بنية MatFormer: تسمح بنية Matryoshka Transformer
بتنشيط اختياري لمَعلمات النماذج لكل طلب من أجل تقليل
تكلفة الحساب ووقت الاستجابة.
مزيد من المعلومات
تحميل المَعلمات الشَرطية: يمكنك تخطّي تحميل مَعلمات الرؤية والصوت في النموذج لتقليل إجمالي عدد المَعلمات المحمَّلة وحفظ موارد الذاكرة.
مزيد من المعلومات
إتاحة لغات متعددة: إمكانات لغوية واسعة النطاق، تم تدريبها على أكثر من
140 لغة
سياق الرموز المميزة التي تبلغ 32 ألف رمز: سياق إدخال أساسي لتحليل البيانات
ومعالجة المهام.
كما هو الحال مع نماذج Gemma الأخرى، يتم توفير Gemma 3n بأوزان مفتوحة ويُسمح باستخدامهاتجاريًا بشكل مسؤول، ما يتيح لك ضبطها ونشرها في مشاريعك وتطبيقاتك.
مَعلمات النموذج والمَعلمات الفعّالة
يتم إدراج طُرز Gemma 3n مع أعداد المَعلمات، مثل E2B و
E4B، التي تكون أدنى من إجمالي عدد المَعلمات الواردة في
الطُرز. تشير البادئة E إلى أنّ هذه النماذج يمكن أن تعمل باستخدام مجموعة مُعدَّلة
من المَعلمات الفعّالة. يمكن تحقيق هذا الإجراء المنخفض للمَعلمات باستخدام
تكنولوجيا المَعلمات المرنة المضمّنة في نماذج Gemma 3n لمساعدتها على العمل
بكفاءة على الأجهزة ذات الموارد المنخفضة.
تنقسم المَعلمات في نماذج Gemma 3n إلى 4 مجموعات رئيسية: مَعلمات النص والمرئيات
والصوت و"التضمين لكل طبقة" (PLE). عند تنفيذ نموذج
E2B بشكل عادي، يتم تحميل أكثر من 5 مليارات مَعلمة عند تنفيذ النموذج.
ومع ذلك، باستخدام تقنيات تخطّي المَعلمات وتخزين PLE، يمكن
تشغيل هذا النموذج مع تحميل ذاكرة فعّال يقلّ قليلاً عن مليارَي (1.91 مليار)
مَعلمة، كما هو موضّح في الشكل 1.
الشكل 1: مَعلمات نموذج Gemma 3n E2B التي يتم تنفيذها بشكل عادي مقارنةً بتحميل مَعلمات أقل فعالية باستخدام تقنيات تخزين PLE المؤقت وتخطّي المَعلمات
باستخدام تقنيات تفريغ المَعلمات وتفعيلها بشكل انتقائي، يمكنك
تشغيل النموذج باستخدام مجموعة بسيطة جدًا من المَعلمات أو تفعيل
مَعلمات إضافية للتعامل مع أنواع البيانات الأخرى، مثل المحتوى المرئي والمسموع. تتيح لك هذه الميزات
زيادة وظائف النموذج أو خفض إمكاناته استنادًا إلى
إمكانات الجهاز أو متطلبات المهمة. توضّح الأقسام التالية المزيد
حول التقنيات الفعّالة للمَعلمات المتاحة في نماذج Gemma 3n.
التخزين المؤقت لـ PLE
تتضمّن نماذج Gemma 3n مَعلمات "التضمين لكل طبقة" (PLE) التي يتم استخدامها
أثناء تنفيذ النموذج لإنشاء بيانات تحسِّن أداء كل
طبقة من طبقات النموذج. يمكن إنشاء بيانات PLE بشكل منفصل، خارج ذاكرة التشغيل
للنموذج، وتخزينها مؤقتًا في مساحة تخزين سريعة، ثم إضافتها إلى عملية
استنتاج النموذج أثناء تشغيل كل طبقة. يتيح هذا النهج إبقاء مَعلمات PLE
خارج مساحة ذاكرة النموذج، ما يقلل من استهلاك الموارد مع مواصلة
تحسين جودة استجابة النموذج.
بنية MatFormer
تستخدِم نماذج Gemma 3n بنية نموذج Matryoshka Transformer أو MatFormer
التي تحتوي على نماذج أصغر مُدمجة ضمن نموذج واحد أكبر. يمكن استخدام النماذج الفرعية المُدمجة
لإجراء الاستنتاجات بدون تفعيل مَعلمات نماذج
التضمين عند الردّ على الطلبات. إنّ هذه القدرة على تشغيل نماذج أساسية أصغر حجمًا فقط ضمن نموذج MatFormer يمكن أن تقلّل من تكلفة الحوسبة ووقت الاستجابة واستهلاك الطاقة للنموذج. في حالة Gemma 3n، يحتوي ملف تعريف
E4B على مَعلمات ملف تعريف E2B. تتيح لك هذه البنية أيضًا
اختيار المَعلمات وتجميع النماذج بأحجام متوسطة
تتراوح بين 2B و4B. لمزيد من التفاصيل حول هذا النهج، يُرجى الاطّلاع على
مقالة البحث MatFormer.
جرِّب استخدام تقنيات MatFormer لتقليل حجم نموذج Gemma 3n باستخدام دليل
MatFormer Lab.
تحميل المَعلمات الشَرطية
على غرار مَعلمات PLE، يمكنك تخطّي تحميل بعض المَعلمات إلى الذاكرة،
مثل المَعلمات الصوتية أو المرئية، في نموذج Gemma 3n لتقليل عبء الذاكرة.
يمكن تحميل هذه المَعلمات ديناميكيًا أثناء التشغيل إذا كان الجهاز يتضمّن
الموارد المطلوبة. بشكل عام، يمكن أن يؤدي تخطّي المَعلمات إلى تقليل سعة ذاكرة التشغيل المطلوبة لنموذج Gemma 3n بشكلٍ أكبر، ما يتيح التنفيذ على نطاق أوسع من الأجهزة ويسمح للمطوّرين بزيادة كفاءة الموارد للمهام الأقل تطلبًا.
هل أنت على استعداد لبدء إنشاء الأدوات؟
البدء
باستخدام نماذج Gemma
تاريخ التعديل الأخير: 2025-06-30 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-06-30 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Gemma 3n model overview\n\nGemma 3n is a generative AI model optimized for use in everyday devices, such as\nphones, laptops, and tablets. This model includes innovations in\nparameter-efficient processing, including Per-Layer Embedding (PLE) parameter\ncaching and a MatFormer model architecture that provides the flexibility to\nreduce compute and memory requirements. These models feature audio input\nhandling, as well as text and visual data.\n\nGemma 3n includes the following key features:\n\n- **Audio input** : Process sound data for speech recognition, translation, and audio data analysis. [Learn more](/gemma/docs/core/huggingface_inference#audio)\n- **Visual and text input** : Multimodal capabilities let you handle vision, sound, and text to help you understand and analyze the world around you. [Learn more](/gemma/docs/core/huggingface_inference#vision)\n- **Vision encoder:** High-performance MobileNet-V5 encoder substantially improves speed and accuracy of processing visual data. [Learn more](https://developers.googleblog.com/en/introducing-gemma-3n-developer-guide/#mobilenet-v5:-new-state-of-the-art-vision-encoder)\n- **PLE caching** : Per-Layer Embedding (PLE) parameters contained in these models can be cached to fast, local storage to reduce model memory run costs. [Learn more](#ple-caching)\n- **MatFormer architecture:** Matryoshka Transformer architecture allows for selective activation of the models parameters per request to reduce compute cost and response times. [Learn more](#matformer)\n- **Conditional parameter loading:** Bypass loading of vision and audio parameters in the model to reduce the total number of loaded parameters and save memory resources. [Learn more](#conditional-parameter)\n- **Wide language support**: Wide linguistic capabilities, trained in over 140 languages.\n- **32K token context**: Substantial input context for analyzing data and handling processing tasks.\n\n[Try Gemma 3n](https://aistudio.google.com/prompts/new_chat?model=gemma-3n-e4b-it)\n[Get it on Kaggle](https://www.kaggle.com/models/google/gemma-3n)\n[Get it on Hugging Face](https://huggingface.co/collections/google/gemma-3n-685065323f5984ef315c93f4)\n\nAs with other Gemma models, Gemma 3n is provided with open weights and\nlicensed for responsible [commercial use](/gemma/terms), allowing you to tune\nand deploy it in your own projects and applications.\n| **Tip:** If you are interested in building generative AI solutions for Android mobile applications, check out Gemini Nano. For more information, see the Android [Gemini Nano](https://developer.android.com/ai/gemini-nano) developer docs.\n\nModel parameters and effective parameters\n-----------------------------------------\n\nGemma 3n models are listed with parameter counts, such as **`E2B`** and\n**`E4B`** , that are *lower* than the total number of parameters contained in the\nmodels. The **`E`** prefix indicates these models can operate with a reduced set\nof Effective parameters. This reduced parameter operation can be achieved using\nthe flexible parameter technology built into Gemma 3n models to help them run\nefficiently on lower resource devices.\n\nThe parameters in Gemma 3n models are divided into 4 main groups: text, visual,\naudio, and per-layer embedding (PLE) parameters. With standard execution of the\nE2B model, over 5 billion parameters are loaded when executing the model.\nHowever, using parameter skipping and PLE caching techniques, this model can be\noperated with an effective memory load of just under 2 billion (1.91B)\nparameters, as illustrated in Figure 1.\n\n**Figure 1.** Gemma 3n E2B model parameters running in standard execution\nversus an effectively lower parameter load using PLE caching and parameter\nskipping techniques.\n\nUsing these parameter offloading and selective activation techniques, you can\nrun the model with a very lean set of parameters or activate additional\nparameters to handle other data types such as visual and audio. These features\nenable you to ramp up model functionality or ramp down capabilities based on\ndevice capabilities or task requirements. The following sections explain more\nabout the parameter efficient techniques available in Gemma 3n models.\n\nPLE caching\n-----------\n\nGemma 3n models include Per-Layer Embedding (PLE) parameters that are used\nduring model execution to create data that enhances the performance of each\nmodel layer. The PLE data can be generated separately, outside the operating\nmemory of the model, cached to fast storage, and then added to the model\ninference process as each layer runs. This approach allows PLE parameters to be\nkept out of the model memory space, reducing resource consumption while still\nimproving model response quality.\n\nMatFormer architecture\n----------------------\n\nGemma 3n models use a Matryoshka Transformer or *MatFormer* model architecture\nthat contains nested, smaller models within a single, larger model. The nested\nsub-models can be used for inferences without activating the parameters of the\nenclosing models when responding to requests. This ability to run just the\nsmaller, core models within a MatFormer model can reduce compute cost, and\nresponse time, and energy footprint for the model. In the case of Gemma 3n, the\nE4B model contains the parameters of the E2B model. This architecture also\nlets you select parameters and assemble models in intermediate sizes\nbetween 2B and 4B. For more details on this approach, see the\n[MatFormer research paper](https://arxiv.org/pdf/2310.07707).\nTry using MatFormer techniques to reduce the size of a Gemma 3n model with the\n[MatFormer Lab](https://goo.gle/gemma3n-matformer-lab)\nguide.\n\nConditional parameter loading\n-----------------------------\n\nSimilar to PLE parameters, you can skip loading of some parameters into memory,\nsuch as audio or visual parameters, in the Gemma 3n model to reduce memory load.\nThese parameters can be dynamically loaded at runtime if the device has the\nrequired resources. Overall, parameter skipping can further reduce the required\noperating memory for a Gemma 3n model, enabling execution on a wider range of\ndevices and allowing developers to increase resource efficiency for less\ndemanding tasks.\n\n\u003cbr /\u003e\n\n\nReady to start building?\n[Get started](/gemma/docs/get_started)\nwith Gemma models!"]]