Command R 35B

CC BY-NC 4.0

Cohere · 35B · كثيف

مهيّأ للتوليد المعزَّز بالاسترجاع (RAG). تعرّف على ما إذا كان كرت شاشتك أو جهاز الماك قادرًا على تشغيل Command R 35B محليًا — 19.6 جيجابايت كحد أدنى، و32.6 جيجابايت موصى بها.

كيف تستخدم Command R 35B في Transformers

حمّل Command R 35B في بايثون عبر مكتبة Transformers من HuggingFace. هذه الأوزان الكاملة غير المكمَّمة، فتحتاج ذاكرة أكبر من ملفات GGUF.

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

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

pipe = pipeline("text-generation", model="CohereLabs/c4ai-command-r-v01")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)

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

pip install -U transformers
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("CohereLabs/c4ai-command-r-v01")
model = AutoModelForCausalLM.from_pretrained("CohereLabs/c4ai-command-r-v01", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))

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

كيف تستخدم Command R 35B في Ollama

ينزّل Ollama النموذج ويفتح محادثة محلية بأمر واحد.

من مكتبة Ollama الرسمية

ollama run command-r:35b

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

أوامر التشغيلHuggingFaceOllama
2024-03سياق 128K

مستويات الـ Quantization

Quantizationالبتاتالذاكرةالجودةالحالة
Q2_K211.7GBمنخفضة—
Q3_K_M316.2GBمتوسطة—
Q4_K_M418.4GBجيدة—
Q5_K_M522.9GBجيدة—
Q6_K627.4GBممتازة—
Q8_0836.4GBممتازة—
F161672.2GBبلا فقد—

التطبيقات

شغّل Command R 35B داخل أدوات البرمجة التي تعمل بالذكاء الاصطناعي — يشغّل الأمر خادم Ollama على جهازك، يحمّل النموذج، ثم يفتح الأداة موصولة به.

  • Claude Code

    وكيل البرمجة من Anthropic، يعمل في الطرفية وداخل المحرّر

    ollama launch claude --model command-r:35b
  • OpenCode

    وكيل برمجة مفتوح المصدر يعمل في الطرفية داخل مستودعك

    ollama launch opencode --model command-r:35b
  • Codex

    وكيل البرمجة من OpenAI في سطر الأوامر

    ollama launch codex --model command-r:35b
  • Droid

    وكيل البرمجة من Factory، للمهام الطويلة عبر عدّة ملفات

    ollama launch droid --model command-r:35b
  • Hermes Agent

    وكيل برمجة مفتوح من Nous Research، بذاكرة تمتد عبر الجلسات

    ollama launch hermes --model command-r:35b
  • OpenClaw

    وكيل مفتوح المصدر يشغّل المهام على جهازك بلا خدمة سحابية

    ollama launch openclaw --model command-r:35b

تحتاج Ollama والأداة نفسها مثبَّتين. إن لم تكن الأداة مثبّتة، يرشدك الأمر إلى طريقة تثبيتها. اكتب ollama launch وحده لاختيار الأداة من قائمة.

عن هذا النموذج

الوصف الرسمي كما نشرته الجهة المطوِّرة، بلغته الأصلية.

Command R is a generative model optimized for long context tasks such as retrieval-augmented generation (RAG) and using external APIs and tools. As a model built for companies to implement at scale, Command R boasts:

  • Strong accuracy on RAG and Tool Use
  • Low latency, and high throughput
  • Longer 128k context
  • Strong capabilities across 10 key languages

There are currently two versions of Command R:

  • Original release tagged v0.1
  • August 2024 update tagged 08-2024

References

أسئلة شائعة عن تشغيل Command R 35B محليًا

هل أستطيع تشغيل Command R 35B على جهازي؟
يحتاج Command R 35B إلى 19.6 جيجابايت من الذاكرة كحد أدنى، والموصى به 32.6 جيجابايت. يكفي أن تفتح هذه الصفحة ليُقيَّم النموذج تلقائيًا أمام كرت شاشتك أو جهاز الماك، ثم تشغّله عبر Ollama أو LM Studio أو llama.cpp.
كم يحتاج Command R 35B من الـ VRAM؟
بتكميم Q4_K_M يستهلك Command R 35B نحو 18.4 جيجابايت من ذاكرة الكرت. أما المستويات الأعلى فتحتاج ذاكرة أكبر، والأدنى تناسب الكروت المحدودة مقابل تنازل في الجودة.