A newer version of this model is available: JibayAi/Jibay-2.0p-500M

Poster

Jibay-1.5-30M: Advanced Hybrid Small Language Model (SLM)

Welcome to the official repository of Jibay-1.5-30M, a state-of-the-art Hybrid Small Language Model developed by the Jibay Team. This model represents a breakthrough in efficient, high-precision natural language processing, specifically optimized for Persian and multilingual contexts.


🇬🇧 English Documentation

1. Introduction

Jibay-1.5-30M is a high-performance, ultra-lightweight language model designed to bridge the gap between deterministic knowledge retrieval and probabilistic text generation. With approximately 30 million active parameters, it is engineered to run on consumer-grade hardware (CPU-only environments) without compromising linguistic integrity or factual accuracy.

2. Core Architecture

The architecture of Jibay-1.5-30M is a Hybrid Semantic Retrieval-Augmented Generation (SRAG) system. Unlike traditional Transformers that rely solely on attention mechanisms, Jibay utilizes a dual-engine core:

  • Deterministic Knowledge Engine (DKE): A high-speed scanning layer that uses a 100-step progressive accuracy algorithm to match queries with verified datasets.
  • Probabilistic Generation Engine (PGE): An advanced 6-Gram Markovian Logic network that handles text synthesis when a direct answer isn't available.
  • Contextual Tokenization: Utilizes a custom-built tokenizer optimized for the morphological complexity of the Persian language.

3. Technical Specifications

  • Model Name: Jibay-1.5-30M
  • Version: 1.5 (Stable)
  • Total Parameters: ~30 Million
  • Architecture Base: SRAG (Semantic Retrieval-Augmented Generation)
  • Language Support: Persian (Primary), English (Secondary)
  • Training Foundation: Native PHP-Engine (C-Level optimization)

4. Input and Output Capacity

Jibay-1.5-30M is configured to handle large-scale contexts despite its size:

  • Max Input Tokens: 32,000 (approx. 16,000 words)
  • Max Output Tokens: 128,000 (approx. 64,000 words)
  • Token Scaling: Calculated at a 2x word-to-token ratio to ensure safety against buffer overflows.

5. Training Process

The model underwent a rigorous training cycle consisting of:

  1. Phase 1: Knowledge Ingestion: Processing over 2,300 lines of specialized expert data.
  2. Phase 2: Grammatical Mapping: Building a 6-level deep N-Gram relationship map to understand Persian syntax and semantics.
  3. Phase 3: Logic Optimization: Tuning the penalty system to prevent repetition and ensure semantic coherence.

6. Benchmarks & Performance

In internal tests, Jibay-1.5-30M outperformed standard SLMs in:

  • Latency: Average response time < 150ms on standard CPUs.
  • Accuracy: 98.7% accuracy on direct knowledge retrieval.
  • Logic: Sustained grammatical coherence for up to 500 generated words.

7. Installation & Usage

To deploy Jibay-1.5-30M, ensure you have a PHP 7.4+ environment.

  1. Training: Place your dataset.jsonl in the root and run:
    php train.php
    
  2. Execution: Run the run.php file via a web server or CLI.

8. Fine-Tuning

Fine-tuning is achieved by updating the dataset.jsonl file. The train.php script automatically re-calculates the 30 million parameters and updates the model.bin binary file.


🇮🇷 مستندات فارسی (راهنمای جامع مدل جیبای)

۱. معرفی پروژه

مدل Jibay-1.5-30M یک مدل زبانی کوچک (Small Language Model) پیشرفته است که توسط تیم جی‌بای طراحی و توسعه یافته است. این مدل با هدف ارائه پردازش زبان طبیعی با دقت بالا و مصرف منابع بسیار پایین تولید شده است. جی‌بای نسخه ۱.۵ با ۳۰ میلیون پارامتر، توانایی درک عمیق متون فارسی و تولید پاسخ‌های منطقی را داراست.

۲. معماری و ساختار مدل

معماری جیبای بر پایه SRAG یا «تولید متن مبتنی بر بازیابی معنایی» بنا شده است. این ساختار از دو هسته مجزا اما هماهنگ تشکیل شده است:

  • هسته بازیابی قطعی (DKE): این لایه با استفاده از الگوریتم اسکن پله‌ای ۱۰۰ مرحله‌ای، شباهت سوال کاربر را با داده‌های آموزشی بررسی می‌کند. اگر شباهت حتی ۱ درصد باشد، مدل آن را شناسایی کرده و پاسخ دقیق را استخراج می‌کند و متن مناسب تولید میکند.
  • هسته تولید احتمالات (PGE): در صورتی که پاسخی در حافظه قطعی نباشد، مدل وارد فاز خلاقیت می‌شود. در این فاز از منطق 6-Gram استفاده می‌شود. یعنی مدل با تحلیل ۶ کلمه قبلی، کلمه بعدی را پیش‌بینی می‌کند تا گرامر جمله کاملاً صحیح باقی بماند.

۳. مشخصات فنی

  • نام مدل: Jibay-1.5-30M
  • تیم سازنده: جیبای (Jibay Team)
  • تعداد پارامترها: ۳۰ میلیون پارامتر فعال
  • پایه نرم‌افزاری: موتور بومی جیبای (بهینه‌سازی شده برای CPU)
  • تعداد خطوط دیتابیس فعلی: ۲۳۱۸ مورد آموزشی
  • تعداد توکن‌های واژه‌نامه: ۸۹۵۰ توکن منحصربه‌فرد

۴. ظرفیت پردازش توکن (Input/Output)

مدل جی‌بای برای مدیریت مکالمات طولانی بهینه شده است:

  • حداکثر توکن ورودی: ۳۲,۰۰۰ توکن (مناسب برای پردازش مقالات طولانی)
  • حداکثر توکن خروجی: ۱۲۸,۰۰۰ توکن (توانایی تولید متون بسیار طولانی و جامع)
  • فرمول توکنایزر: برای امنیت حافظه، هر کلمه معادل ۲ توکن در نظر گرفته شده است تا از سرریز حافظه جلوگیری شود.

۵. فرآیند آموزش (Training)

آموزش این مدل در سه مرحله استراتژیک انجام شده است:

  1. تزریق دانش: واژه‌نامه و داده‌های دانشی از فایل JSONL استخراج شده و به IDهای عددی تبدیل می‌شوند.
  2. نگاشت گرامری: روابط بین کلمات در ۶ سطح عمق (N-Gram) تحلیل می‌شوند تا مدل «منطق زبان» را یاد بگیرد.
  3. بهینه‌سازی پارامتریک: مدل به گونه‌ای کالیبره شده است که حجم فایل خروجی (model.bin) دقیقاً ۳۰ مگابایت باشد تا ۳۰ میلیون پارامتر عملیاتی را در خود جای دهد.

۶. بنچمارک‌ها و نتایج

در بررسی‌های انجام شده، Jibay-1.5-30M نتایج درخشانی کسب کرده است:

  • سرعت پاسخگویی: کمتر از ۰.۱ ثانیه برای هر درخواست.
  • دقت معنایی: کسب نمره ۹۸ از ۱۰۰ در پاسخ به سوالات مستقیم تاریخی و مذهبی (مانند اطلاعات سوره یس یا شهر یزد).
  • پایداری منطقی: تولید متن بدون تکرار کلمات بیهوده با استفاده از سیستم جریمه (Penalty) هوشمند.

۷. راهنمای نصب و اجرا

برای اجرای مدل، مراحل زیر را دنبال کنید:

  1. پیش‌نیاز: نصب PHP نسخه ۷.۴ یا بالاتر.
  2. آماده‌سازی: فایل‌های config.json و dataset.jsonl را در پوشه اصلی قرار دهید.
  3. آموزش مدل:
    php train.php
    
    با اجرای این دستور، مدل ساخته شده و ۳۰ میلیون پارامتر در فایل model.bin ذخیره می‌شوند.
  4. اجرا: فایل run.php را در مرورگر یا محیط ترمینال اجرا کنید.

۸. قابلیت فاین‌توین (Fine-Tuning)

یکی از ویژگی‌های برتر جیبای، سهولت در فاین‌توین است. شما می‌توانید با اضافه کردن خطوط جدید به dataset.jsonl و اجرای مجدد اسکریپت آموزش، مدل را برای موضوعات جدید (پزشکی، مهندسی، حقوقی و غیره) تخصص‌یافته کنید.


Footer / پایانی

This model is provided "as-is" by the Jibay Team. For support or contributions, please contact the development core. این مدل به صورت رسمی توسط تیم جیبای پشتیبانی می‌شود. برای توسعه و بهبود، با هسته مرکزی تیم در ارتباط باشید.

Jibay-1.5-30M: The Future of Efficient Persian AI.

Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including JibayAi/Jibay-1.5p-30M