-
Notifications
You must be signed in to change notification settings - Fork 33.8k
[i18n-ar] Translated file : docs/source/ar/gguf.md into Arabic
#33037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
AhmedAlmaghz
wants to merge
12
commits into
huggingface:main
from
AhmedAlmaghz:Add_docs_source_ar_gguf.md
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d0572ae
Add docs/source/ar/gguf.md to Add_docs_source_ar_gguf.md
AhmedAlmaghz 5c92f79
Update docs/source/ar/gguf.md
AhmedAlmaghz 43b8866
Update docs/source/ar/gguf.md
AhmedAlmaghz 7f59c31
Update docs/source/ar/gguf.md
AhmedAlmaghz bd4c6c4
Update docs/source/ar/gguf.md
AhmedAlmaghz 29766a2
Update docs/source/ar/gguf.md
AhmedAlmaghz fd1964a
Update docs/source/ar/gguf.md
AhmedAlmaghz 03bc806
Update docs/source/ar/gguf.md
AhmedAlmaghz dc24b54
Update docs/source/ar/gguf.md
AhmedAlmaghz ddb7a85
Update docs/source/ar/gguf.md
AhmedAlmaghz a04bb43
Update docs/source/ar/gguf.md
AhmedAlmaghz 435ed2c
Update docs/source/ar/gguf.md
AhmedAlmaghz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # GGUF وتفاعلها مع المحولات | ||
|
|
||
| تُستخدم صيغة ملف GGUF لتخزين النماذج للاستنتاج مع [GGML](https://github.com/ggerganov/ggml) والمكتبات الأخرى التي تعتمد عليها، مثل [llama.cpp](https://github.com/ggerganov/llama.cpp) أو [whisper.cpp](https://github.com/ggerganov/whisper.cpp) الشهيرة جدًا. | ||
|
|
||
| إنها صيغة ملف [مدعومة من قبل Hugging Face Hub](https://huggingface.co/docs/hub/en/gguf) مع ميزات تسمح بالتفتيش السريع للتوابع والبيانات الوصفية داخل الملف. | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| تم تصميم تنسيق الملف هذا كـ "تنسيق ملف واحد" حيث يحتوي ملف واحد عادةً على كل من سمات التكوين ومفردات المحلل اللغوي والسمات الأخرى، بالإضافة إلى جميع التوابع التي سيتم تحميلها في النموذج. تأتي هذه الملفات بتنسيقات مختلفة وفقًا لنوع التكميم في الملف. نلقي نظرة موجزة على بعضها [هنا](https://huggingface.co/docs/hub/en/gguf#quantization-types). | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## الدعم داخل المحولات | ||
|
|
||
| أضفنا القدرة على تحميل ملفات `gguf` داخل `المحولات` لتوفير قدرات تدريب/ضبط إضافية لنماذج gguf، قبل إعادة تحويل تلك النماذج إلى `gguf` لاستخدامها داخل نظام بيئي `ggml`. عند تحميل نموذج، نقوم أولاً بإلغاء تكميمه إلى fp32، قبل تحميل الأوزان لاستخدامها في PyTorch. | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| > [!ملاحظة] | ||
| > لا يزال الدعم استكشافيًا للغاية ونرحب بالمساهمات لتثبيته عبر أنواع التكميم وبنيات النماذج. | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| فيما يلي، بنيات النماذج وأنواع التكميم المدعومة: | ||
|
|
||
| ### أنواع التكميم المدعومة | ||
|
|
||
| تُحدد أنواع التكميم المدعومة مبدئيًا وفقًا لملفات التكميم الشائعة التي تمت مشاركتها على Hub. | ||
|
|
||
| - F32 | ||
| - Q2_K | ||
| - Q3_K | ||
| - Q4_0 | ||
| - Q4_K | ||
| - Q5_K | ||
| - Q6_K | ||
| - Q8_0 | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| نأخذ مثالاً من المحلل الممتاز [99991/pygguf](https://github.com/99991/pygguf) Python لإلغاء تكميم الأوزان. | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### بنيات النماذج المدعومة | ||
|
|
||
| في الوقت الحالي، بنيات النماذج المدعومة هي البنيات التي كانت شائعة جدًا على Hub، وهي: | ||
|
|
||
| - LLaMa | ||
| - ميسترال | ||
| - Qwen2 | ||
|
AhmedAlmaghz marked this conversation as resolved.
|
||
|
|
||
| ## مثال الاستخدام | ||
|
|
||
| لتحميل ملفات `gguf` في `المحولات`، يجب تحديد وسيط `gguf_file` لأساليب `from_pretrained` لكل من المحللات اللغوية والنماذج. فيما يلي كيفية تحميل محلل لغوي ونموذج، يمكن تحميلهما من نفس الملف بالضبط: | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```py | ||
| from transformers import AutoTokenizer, AutoModelForCausalLM | ||
|
|
||
| model_id = "TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF" | ||
| filename = "tinyllama-1.1b-chat-v1.0.Q6_K.gguf" | ||
|
|
||
| tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename) | ||
| model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename) | ||
| ``` | ||
|
|
||
| الآن لديك حق الوصول إلى الإصدار الكامل غير المكمم للنموذج في نظام PyTorch البيئي، حيث يمكنك دمجه مع مجموعة من الأدوات الأخرى. | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| لإعادة التحويل إلى ملف `gguf`، نوصي باستخدام ملف [`convert-hf-to-gguf.py`](https://github.com/ggerganov/llama.cpp/blob/master/convert-hf-to-gguf.py) من llama.cpp. | ||
|
|
||
| فيما يلي كيفية إكمال البرنامج النصي أعلاه لحفظ النموذج وتصديره مرة أخرى إلى `gguf`: | ||
|
AhmedAlmaghz marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```py | ||
| tokenizer.save_pretrained('directory') | ||
| model.save_pretrained('directory') | ||
|
|
||
| !python ${path_to_llama_cpp}/convert-hf-to-gguf.py ${directory} | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.