0Pricing
NLP Academy · درس

جولة في مكتبة Transformers

النماذج وأدوات تقسيم النص والمسارات

جولة في مكتبة Transformers درس مجاني في NLP Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في NLP Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة NLP Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Meet Transformers

Hugging Face Transformers is the go-to Python library for using and fine-tuning state-of-the-art language models with very little code. 🤗

One Install Away

You add the library to your project with a single pip command, and suddenly thousands of pretrained models are within reach.

pip install transformers

The Three Pillars

Almost everything you do rests on three building blocks: a model, a tokenizer, and a high-level pipeline that ties them together.

What a Model Is

A model holds the learned weights of a transformer like BERT or GPT. It turns input numbers into predictions such as labels or text.

What a Tokenizer Does

A tokenizer converts your raw text into the integer ids the model expects, and converts the output back into readable text.

Pipelines Hide the Wiring

A pipeline bundles a tokenizer and model into one callable, so you can run a task in a single line without manual setup.

from transformers import pipeline
clf = pipeline("sentiment-analysis")

Run Your First Task

Once built, you call the pipeline like a function and it returns a clean result with a label and a confidence score.

print(clf("I love this library!"))

The Model Hub

The Hugging Face Hub hosts shared models you load by name, so you rarely need to train anything from scratch.

Auto Classes

Helpers like AutoModel and AutoTokenizer pick the right class for any checkpoint, so one line of code works across many architectures.

from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("bert-base-uncased")

Tasks You Get for Free

Pipelines cover many jobs out of the box: classification, named-entity recognition, summarization, translation, and question answering.

From Using to Adapting

Pipelines are great for trying models, but to make one truly yours you will fine-tune it on your own data later in this course.

Quick Check

Which piece turns raw text into the integer ids a model can read?

Recap

Transformers gives you models, tokenizers, and pipelines. Load a checkpoint from the Hub and run real NLP tasks in just a few lines. ✅

الأسئلة الشائعة

هل درس «جولة في مكتبة Transformers» مجاني؟

نعم — نص درس «جولة في مكتبة Transformers» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة NLP Academy، انتقل إلى CoddyKit PRO. تتضمن دورة NLP Academy 4 دروس في المجموع.

ماذا ستتعلم في «جولة في مكتبة Transformers»؟

النماذج وأدوات تقسيم النص والمسارات تتمرن على NLP Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ NLP Academy؟

لا تُشترط خبرة سابقة. NLP Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «جولة في مكتبة Transformers»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس NLP Academy هذا؟

نعم. كل درس في NLP Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. جولة في مكتبة Transformers
  2. تقسيم النص لنماذج Transformer
  3. الضبط الدقيق باستخدام Trainer API
  4. تقييم النموذج وحفظه
← العودة إلى NLP Academy