DiffusionGemma 26B-A4B IT

Apache 2.0

Google · 26B (4B active) · MoE

مزيج خبراء بانتشار متقطّع — أكثر من ١١٠٠ رمز/ث على H100، ومتعدّد الوسائط (نص وصورة وفيديو). تعرّف على ما إذا كان كرت شاشتك أو جهاز الماك قادرًا على تشغيل DiffusionGemma 26B-A4B IT محليًا — 14.5 جيجابايت كحد أدنى، و24.2 جيجابايت موصى بها.

كيف تستخدم DiffusionGemma 26B-A4B IT في Transformers

حمّل DiffusionGemma 26B-A4B IT في بايثون عبر مكتبة Transformers من HuggingFace. هذه الأوزان الكاملة غير المكمَّمة، فتحتاج ذاكرة أكبر من ملفات GGUF.

عبر pipeline — الطريقة الأسهل

pip install -U transformers
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="google/diffusiongemma-26B-A4B-it")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)

تحميل النموذج مباشرة

pip install -U transformers
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("google/diffusiongemma-26B-A4B-it")
model = AutoModelForMultimodalLM.from_pretrained("google/diffusiongemma-26B-A4B-it", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))

التوثيق الرسمي: Transformers

كيف تستخدم DiffusionGemma 26B-A4B IT في llama.cpp

يحمّل llama.cpp ملف DiffusionGemma 26B-A4B IT من HuggingFace مباشرة ويشغّله، إمّا خادمًا متوافقًا مع OpenAI بواجهة ويب أو في الطرفية. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

التثبيت على macOS وLinux

curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

التثبيت عبر WinGet على Windows

winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

نسخة جاهزة من صفحة الإصدارات

# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

البناء من الكود المصدري

git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

عبر Docker

docker model run hf.co/unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

التوثيق الرسمي: llama.cpp

كيف تستخدم DiffusionGemma 26B-A4B IT في Ollama

ينزّل Ollama النموذج ويفتح محادثة محلية بأمر واحد. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

من ملف GGUF على HuggingFace

ollama run hf.co/unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

التوثيق الرسمي: Ollama

كيف تستخدم DiffusionGemma 26B-A4B IT في Pi

Pi وكيل برمجة يعمل في الطرفية. شغّل DiffusionGemma 26B-A4B IT على خادم llama.cpp محلي ثم وجّه Pi إليه. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

أضف النموذج إلى Pi

# Install Pi:
npm install -g @earendil-works/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
  "providers": {
    "llama-cpp": {
      "baseUrl": "http://localhost:8080/v1",
      "api": "openai-completions",
      "apiKey": "none",
      "models": [
        {
          "id": "unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M"
        }
      ]
    }
  }
}

شغّل Pi

# Start Pi in your project directory:
pi

التوثيق الرسمي: Pi

كيف تستخدم DiffusionGemma 26B-A4B IT في node-llama-cpp

شغّل DiffusionGemma 26B-A4B IT من Node.js بلا تثبيت مسبق. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

محادثة مع النموذج

npx -y node-llama-cpp chat hf:unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

قدّر توافق النموذج مع جهازك

npx -y node-llama-cpp inspect estimate hf:unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

التوثيق الرسمي: node-llama-cpp

كيف تستخدم DiffusionGemma 26B-A4B IT في Docker Model Runner

يشغّل Docker Desktop النموذج محليًا ويتيحه عبر واجهة متوافقة مع OpenAI. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

شغّل النموذج

docker model run hf.co/unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

التوثيق الرسمي: Docker Model Runner

كيف تستخدم DiffusionGemma 26B-A4B IT في LocalAI

LocalAI خادم محلي متوافق مع OpenAI. استبدل {{GGUF_FILE}} باسم ملف GGUF الذي تريده من المستودع unsloth/diffusiongemma-26B-A4B-it-GGUF.

التثبيت من ملف تنفيذي

curl https://localai.io/install.sh | sh
# Load and run the model:
local-ai run huggingface://unsloth/diffusiongemma-26B-A4B-it-GGUF/{{GGUF_FILE}}

عبر صور Docker

# Pull the image:
docker pull localai/localai:latest-cpu
# Load and run the model:
docker run -p 8080:8080 --name localai -v $PWD/models:/build/models localai/localai:latest-cpu huggingface://unsloth/diffusiongemma-26B-A4B-it-GGUF/{{GGUF_FILE}}

التوثيق الرسمي: LocalAI

كيف تستخدم DiffusionGemma 26B-A4B IT في Lemonade

Lemonade خادم محلي من AMD يعمل على المعالجات وكروت الشاشة. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

نزّل النموذج

# Download Lemonade from https://lemonade-server.ai/
lemonade pull unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

شغّل النموذج وحاوره

lemonade run user.diffusiongemma-26B-A4B-it-GGUF-Q4_K_M

اعرض كل النماذج المتاحة

lemonade list

التوثيق الرسمي: Lemonade

كيف تستخدم DiffusionGemma 26B-A4B IT في Hermes Agent

وكيل Hermes من Nous Research. شغّل DiffusionGemma 26B-A4B IT على خادم llama.cpp محلي ثم وجّه Hermes إليه. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

اضبط Hermes

# Install Hermes:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup
# Point Hermes at the local server:
hermes config set model.provider custom
hermes config set model.base_url http://127.0.0.1:8080/v1
hermes config set model.default unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

شغّل Hermes

hermes

التوثيق الرسمي: Hermes Agent

كيف تستخدم DiffusionGemma 26B-A4B IT في OpenClaw

OpenClaw وكيل مفتوح المصدر يعمل على جهازك. شغّل DiffusionGemma 26B-A4B IT على خادم llama.cpp محلي ثم سجّله في OpenClaw. اختر مستوى الـ Quantization من القائمة، وتتحدّث الأوامر معه.

ملف GGUF من unsloth/diffusiongemma-26B-A4B-it-GGUF

شغّل خادم llama.cpp

# Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama serve -hf unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M

اضبط OpenClaw

# Install OpenClaw:
npm install -g openclaw@latest
# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
  --auth-choice custom-api-key \
  --custom-base-url http://127.0.0.1:8080/v1 \
  --custom-model-id "unsloth/diffusiongemma-26B-A4B-it-GGUF:Q4_K_M" \
  --custom-provider-id llama-cpp \
  --custom-compatibility openai \
  --custom-text-input \
  --accept-risk \
  --skip-health

شغّل OpenClaw

openclaw agent --local --agent main --message "Hello from Hugging Face"

التوثيق الرسمي: OpenClaw

أوامر التشغيلHuggingFace
2026-06سياق 256K

MoE

إجمالي الخبراء: 128
الخبراء النشطون: 8
المعاملات النشطة: 3.8B

مستويات الـ Quantization

Quantizationالبتاتالذاكرةالجودةالحالة
Q2_K28.8GBمنخفضة—
Q3_K_M312.2GBمتوسطة—
Q4_K_M413.8GBجيدة—
Q5_K_M517.1GBجيدة—
Q6_K620.5GBممتازة—
Q8_0827.1GBممتازة—
F161653.8GBبلا فقد—

الأرقام تشمل الأوزان وذاكرة KV عند طول سياق 2K توكن. غيّر طول السياق من لوحة جهازك لترى أثره على الذاكرة والسرعة.

أسئلة شائعة عن تشغيل DiffusionGemma 26B-A4B IT محليًا

هل أستطيع تشغيل DiffusionGemma 26B-A4B IT على جهازي؟
يحتاج DiffusionGemma 26B-A4B IT إلى 14.5 جيجابايت من الذاكرة كحد أدنى، والموصى به 24.2 جيجابايت. يكفي أن تفتح هذه الصفحة ليُقيَّم النموذج تلقائيًا أمام كرت شاشتك أو جهاز الماك، ثم تشغّله عبر Ollama أو LM Studio أو llama.cpp.
كم يحتاج DiffusionGemma 26B-A4B IT من الـ VRAM؟
بتكميم Q4_K_M يستهلك DiffusionGemma 26B-A4B IT نحو 13.8 جيجابايت من ذاكرة الكرت. أما المستويات الأعلى فتحتاج ذاكرة أكبر، والأدنى تناسب الكروت المحدودة مقابل تنازل في الجودة.