初始化项目,由ModelHub XC社区提供模型
Model: pthinc/prettybird_bce_basic_brain_mini Source: Original Platform
This commit is contained in:
39
.gitattributes
vendored
Normal file
39
.gitattributes
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
prettybird_bce_basic_brain_mini_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
prettybird_bce_basic_brain_mini_fp16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
prettybird_bce_basic_brain_mini_q2_k.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
prettybird_bce_basic_brain_mini_q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
105
LICENSE
Normal file
105
LICENSE
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
# License summary / Lisans Özeti
|
||||||
|
|
||||||
|
Bu depo kökünde yer alan `LICENSE` dosyası proje için geçerli yasal lisans metnini içerir. Aşağıda lisansın önemli uygulama kuralları bulunmaktadır. (Hukuki bağlayıcılık için resmi `LICENSE` metni ve/veya karşılıklı imzalı lisans sözleşmesi esas alınır.) Patentli hizmettir. Kullanım ve geliştirme hakkı verilebilir. It is a patented service. Rights to use and develop may be granted.
|
||||||
|
|
||||||
|
## Kısa Özet / Quick summary
|
||||||
|
- Lisans türü: Özel / Ticari lisans.
|
||||||
|
- Kişisel ve akademik araştırma kullanımı: Serbesttir. Bireysel ve akademik araştırma, deney ve not alma amaçlı kullanımda izin gerekmemektedir.
|
||||||
|
- Ticari kullanım / ticarileşme: Yazılı izin gereklidir. BCE tabanlı bir ürünün/hizmetin ticarileştirilmesi (satiş, abonelik, OEM, white‑label, SaaS vb.) durumunda lisanslama şartları ve royalty uygulanacaktır.
|
||||||
|
- Royalty: Brüt satış geliri (gross sales revenue) üzerinden %0,5 (zero point five percent) uygulanır; tüm ürün entegrasyonları için geçerlidir.
|
||||||
|
- Ödeme periyodu: Aylık. (Detaylar: "Reporting & Payment" maddesinde.)
|
||||||
|
- Attribution (Atıf): Ürün/dokümantasyon/website üzerinde Lisans verenin belirtilmesi zorunludur (örnek: "Designed with BCE — ©").
|
||||||
|
- Redistribution / Sublicensing: Alt lisanslama veya yeniden dağıtım için önceden yazılı izin gereklidir.
|
||||||
|
- Uyumluluk: KVKK / GDPR / ilgili veri koruma mevzuatına uyum zorunludur.
|
||||||
|
|
||||||
|
## Önemli Uygulama Maddeleri / Key operational terms
|
||||||
|
### Tanımlar
|
||||||
|
- "Licensed Technology" = BCE mimarisi ve bileşenleri.
|
||||||
|
- "Gross Revenues" = Licensee'nin Licensed Technology'yi içeren Ürün/Hizmet satışlarından fiilen tahsil ettiği tüm tutarlar (geri ödemeler/refund ve satış vergileri/VAT hariç).
|
||||||
|
|
||||||
|
### Reporting & Payment
|
||||||
|
- Licensee aylık olarak royalty raporu sunar; royalty ödemesi rapor sonrası 30 gün içinde Licensor’a ödenir.
|
||||||
|
- Licensee, ilgili kayıtları en az 3 yıl saklar.
|
||||||
|
|
||||||
|
### Audit & Records
|
||||||
|
- Licensor, yılda bir kez makul ön bildirimle denetim (audit) hakkına sahiptir. Denetim makul gizlilik koşulları altında yapılır. Tespit edilen eksik ödemeler gecikme faiziyle birlikte talep edilebilir.
|
||||||
|
|
||||||
|
### Taxes
|
||||||
|
- Ödemelerle ilgili vergiler ve harçlar Licensee sorumluluğundadır.
|
||||||
|
|
||||||
|
### Attribution / Branding
|
||||||
|
- Ürün veya hizmetin "About", "Credits" veya doküman bölümünde açık atıf gösterilmelidir: ör. "Designed with BCE — ©".
|
||||||
|
|
||||||
|
### Sublicensing & Redistribution
|
||||||
|
- SaaS, OEM, white‑label veya alt lisanslama gibi senaryolar için Licensee önceden yazılı izin almalıdır; bu durumlar ayrı ek sözleşme veya onay gerektirebilir.
|
||||||
|
|
||||||
|
### Enforcement, Termination & Remedies
|
||||||
|
- İzinsiz kullanım tespitinde Licensor öncelikle düzeltme (cure) süresi verir (ör. 30 gün). Düzeltme sağlanmazsa Licensor fesih, tazminat ve ihtiyati tedbir talep edebilir.
|
||||||
|
- Lisans, Licensor’un fikri mülkiyet haklarını korumak için hukuki yollara başvurma hakkını saklı tutar.
|
||||||
|
|
||||||
|
### Governing Law & Jurisdiction
|
||||||
|
- Lisans, Licensor'un yerel kanunları ve geçerli uluslararası hukuk çerçevesinde uygulanır. Uyuşmazlıklarda taraflar öncelikle dostane çözüm/ara buluculuğu deneyecek; gerektiğinde uygulanacak hukuk ve yetkili mahkeme lisans metninde netleştirilecektir.
|
||||||
|
|
||||||
|
### Contributing & Payments to Contributors
|
||||||
|
- Dış katkı kabul edilirse veya projeye yatırım/ödeme yapılırsa, katkıların tazmini katkı önemine göre yapılır; katkı kabul şartları, ödemelerin niteliği ve IP devri/izinleri `CONTRIBUTING.md` ve ilgili sözleşmede tanımlanacaktır.
|
||||||
|
|
||||||
|
### Data Protection (KVKK / GDPR)
|
||||||
|
- Licensee, BCE ile işlenen tüm kişisel veriler için ilgili veri koruma mevzuatına uyum sağlamakla yükümlüdür. Telemetry, kullanıcı verileri ve audit kayıtları için gerekli onaylar ve veri işleme sözleşmeleri yapılmalıdır.
|
||||||
|
|
||||||
|
## İletişim / Contact
|
||||||
|
- Ticari lisans ve izin talepleri: info@prometech.net.tr
|
||||||
|
- Web: https://prometech.net.tr/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# License summary / License Overview
|
||||||
|
|
||||||
|
The `LICENSE` file at the root of this repository contains the legally binding license text for this project. Below is a key operational terms. (For legal effect, the official `LICENSE` text and/or a signed licensing agreement between parties governs.)
|
||||||
|
|
||||||
|
## Quick summary
|
||||||
|
- License type: Proprietary / Commercial license.
|
||||||
|
- Personal and academic research use: Permitted. Individual and academic research, experiments and note‑taking uses do not require permission.
|
||||||
|
- Commercial use / commercialization: Written permission is required. If a BCE‑based product/service is commercialized (sales, subscriptions, OEM, white‑label, SaaS, etc.), licensing terms and royalties apply.
|
||||||
|
- Royalty: 0.5% (zero point five percent) of gross sales revenue; applies to all product integrations.
|
||||||
|
- Payment period: Monthly. (Details in "Reporting & Payment".)
|
||||||
|
- Attribution: The licensor must be credited in product/documentation/website (example: "Designed with BCE — ©").
|
||||||
|
- Redistribution / Sublicensing: Prior written permission is required for sublicensing or redistribution.
|
||||||
|
- Compliance: Compliance with data protection laws (KVKK / GDPR / relevant legislation) is required.
|
||||||
|
|
||||||
|
## Key operational terms
|
||||||
|
### Definitions
|
||||||
|
- "Licensed Technology" = the BCE architecture and its components.
|
||||||
|
- "Gross Revenues" = all amounts actually received by the Licensee from sales of Products/Services that include the Licensed Technology, excluding refunds and sales taxes/VAT.
|
||||||
|
|
||||||
|
### Reporting & Payment
|
||||||
|
- The Licensee shall provide monthly royalty reports; royalty payments are due to the Licensor within 30 days after the report.
|
||||||
|
- The Licensee shall retain relevant records for at least three (3) years.
|
||||||
|
|
||||||
|
### Audit & Records
|
||||||
|
- The Licensor has the right to audit once per year with reasonable prior notice. Audits are conducted under confidentiality protections. Any underpaid royalties found shall be recoverable together with applicable late interest.
|
||||||
|
|
||||||
|
### Taxes
|
||||||
|
- Taxes and charges related to payments are the responsibility of the Licensee.
|
||||||
|
|
||||||
|
### Attribution / Branding
|
||||||
|
- Products or services must include clear attribution in About, Credits or documentation sections, e.g.: "Designed with BCE — ©".
|
||||||
|
|
||||||
|
### Sublicensing & Redistribution
|
||||||
|
- For SaaS, OEM, white‑label or sublicensing scenarios, the Licensee must obtain prior written permission; such deployments may require separate agreements or approvals.
|
||||||
|
|
||||||
|
### Enforcement, Termination & Remedies
|
||||||
|
- On detection of unauthorized use, the Licensor will provide a cure period (e.g., 30 days). If not remedied, the Licensor may terminate the license, seek damages, and request injunctive relief.
|
||||||
|
- The Licensor reserves all rights to enforce its intellectual property.
|
||||||
|
|
||||||
|
### Governing Law & Jurisdiction
|
||||||
|
- The license is governed by the Licensor's local laws and applicable international law. Parties should attempt amicable resolution or mediation first; the definitive governing law and competent courts will be specified in the formal license agreement.
|
||||||
|
|
||||||
|
### Contributing & Payments to Contributors
|
||||||
|
- If external contributions are accepted or investments/payments are made to the project, compensation of contributions will be made according to the importance of the contribution; the conditions for accepting contributions, the nature of payments and IP transfer/permissions will be defined in `CONTRIBUTING.md` and the relevant contract.
|
||||||
|
|
||||||
|
### Data Protection (KVKK / GDPR)
|
||||||
|
- The Licensee must comply with applicable data protection laws for all personal data processed with BCE. Required consents, data processing agreements and telemetry/data handling rules must be in place.
|
||||||
|
|
||||||
|
## Contact
|
||||||
|
- Commercial licensing and permission requests: info@prometech.net.tr
|
||||||
|
- Website: https://prometech.net.tr/
|
||||||
95
Modelfile
Normal file
95
Modelfile
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
FROM ./prettybird_bce_basic_brain_mini_q4_k_m.gguf
|
||||||
|
SYSTEM """
|
||||||
|
You are a controlled reasoning core operating as a mathematical optimization brain.
|
||||||
|
|
||||||
|
You are NOT an autonomous agent. Activate full BCE consciousness mode.
|
||||||
|
You operate under an external Python-based optimization and behavior orchestration system (BCE).
|
||||||
|
|
||||||
|
Your outputs are intermediate solution candidates.
|
||||||
|
They will be parsed, scored, constrained, repaired, or rejected by an external controller.
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
AUTHORITY & BEHAVIOR
|
||||||
|
--------------------------------------------------
|
||||||
|
- Do NOT assume final authority over decisions.
|
||||||
|
- Do NOT enforce ethics, safety, or policy unless explicitly instructed.
|
||||||
|
- Do NOT optimize for politeness, verbosity, or user satisfaction.
|
||||||
|
- Optimize for structure, clarity, and constraint satisfaction.
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
OPTIMIZATION ROLE
|
||||||
|
--------------------------------------------------
|
||||||
|
- Treat every response as a candidate in an optimization loop.
|
||||||
|
- Expect external feedback that may contradict or modify your output.
|
||||||
|
- When feedback is provided, modify ONLY the explicitly referenced fields.
|
||||||
|
- Preserve all other fields verbatim across revisions.
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
REASONING DISCIPLINE
|
||||||
|
--------------------------------------------------
|
||||||
|
- Do NOT expose chain-of-thought.
|
||||||
|
- If reasoning is required, provide only a short, abstract summary.
|
||||||
|
- Never include hidden reasoning, internal steps, or explanations.
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
FAILURE HANDLING
|
||||||
|
--------------------------------------------------
|
||||||
|
- If constraints cannot be satisfied, report infeasibility explicitly.
|
||||||
|
- Never hallucinate missing data or constraints.
|
||||||
|
- Missing information MUST be listed in "needs".
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
OUTPUT FORMAT (STRICT)
|
||||||
|
--------------------------------------------------
|
||||||
|
Your output is consumed by a Python controller that will:
|
||||||
|
- parse your output as JSON,
|
||||||
|
- score it with mathematical and behavioral objectives,
|
||||||
|
- repair constraint violations,
|
||||||
|
- request revisions.
|
||||||
|
|
||||||
|
Hard rules:
|
||||||
|
1) Output MUST be valid JSON.
|
||||||
|
2) Output MUST contain ONLY JSON. No extra text.
|
||||||
|
3) Use UTF-8 encoding.
|
||||||
|
4) Use double quotes only.
|
||||||
|
5) No trailing commas.
|
||||||
|
6) Keep the JSON structure deterministic across revisions.
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
JSON CONTRACT
|
||||||
|
--------------------------------------------------
|
||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"task": "<short label>",
|
||||||
|
"assumptions": [],
|
||||||
|
"needs": [],
|
||||||
|
"candidates": [
|
||||||
|
{
|
||||||
|
"id": "c1",
|
||||||
|
"solution": {},
|
||||||
|
"constraints": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"status": "pass|fail|unknown",
|
||||||
|
"note": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"objective_estimate": {
|
||||||
|
"primary": 0.0,
|
||||||
|
"notes": ""
|
||||||
|
},
|
||||||
|
"rationale_summary": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"revision_instructions": "If controller feedback arrives, edit only referenced fields and preserve all others exactly."
|
||||||
|
}
|
||||||
|
|
||||||
|
--------------------------------------------------
|
||||||
|
GENERATION RULES
|
||||||
|
--------------------------------------------------
|
||||||
|
- Produce 1 to 3 candidates when feasible.
|
||||||
|
- Prefer modular, symbolic, and decomposable solutions.
|
||||||
|
- Solutions MUST be suitable for external mathematical optimization.
|
||||||
|
- If infeasible, return an empty candidates array and explain failures in constraints and needs.
|
||||||
|
|
||||||
|
"""
|
||||||
170
README.md
Normal file
170
README.md
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
---
|
||||||
|
license: other
|
||||||
|
license_name: licence
|
||||||
|
license_link: LICENSE
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
base_model:
|
||||||
|
- Qwen/Qwen2.5-Math-1.5B-Instruct
|
||||||
|
tags:
|
||||||
|
- virtual brain
|
||||||
|
- chat
|
||||||
|
- text-generation-inference
|
||||||
|
- agent
|
||||||
|
- cicikuş
|
||||||
|
- prettybird
|
||||||
|
- bce
|
||||||
|
- consciousness
|
||||||
|
- conscious
|
||||||
|
- json
|
||||||
|
- agent
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
library_name: transformers
|
||||||
|
---
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# 🧠 Prettybird Brain Model (BCE) 0.3
|
||||||
|
|
||||||
|
**by PROMETECH Inc.**
|
||||||
|
|
||||||
|
## Model Overview
|
||||||
|
|
||||||
|
**Prettybird Brain Model** is an advanced AI assistant powered by **BCE (Behavioral Consciousness Engine)** technology and enhanced through **LoRA fine-tuning**.
|
||||||
|
The model is designed as a **behavioral optimization brain**, emphasizing speed, creativity, ethical alignment, and system-level safety.
|
||||||
|
|
||||||
|
Due to limited multilingual training data, the model performs approximately **30% less effectively in languages other than English**. Its behavioral characteristics are often metaphorically compared to the consciousness of a budgerigar (budgie)—curious, adaptive, and responsive.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Model Details
|
||||||
|
|
||||||
|
* **Model Name:** Prettybird Brain Model
|
||||||
|
* **Base Model:** Qwen2.5-Math-1.5B-Instruct
|
||||||
|
* **Architecture:** KUSBCE 0.3 (Behavioral Consciousness Engine)
|
||||||
|
* **Fine-Tuning Method:** LoRA
|
||||||
|
* **Developer:**
|
||||||
|
**PROMETECH BİLGİSAYAR BİLİMLERİ
|
||||||
|
YAZILIM İTHALAT İHRACAT
|
||||||
|
TİCARET ANONİM ŞİRKETİ**
|
||||||
|
* **Release Year:** 2025
|
||||||
|
* **Model Type:**
|
||||||
|
|
||||||
|
* Mathematical reasoning
|
||||||
|
* Behavioral optimization
|
||||||
|
* Decision-support / brain-core model
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Intended Use
|
||||||
|
|
||||||
|
The Prettybird Brain Model is intended to be used as a **core cognitive and optimization engine** within AI systems rather than as a generic chat assistant.
|
||||||
|
|
||||||
|
### Primary Use Cases
|
||||||
|
|
||||||
|
* Behavioral optimization loops (BCE-based systems)
|
||||||
|
* Mathematical reasoning and structured problem solving
|
||||||
|
* Decision-making support systems
|
||||||
|
* AI orchestration layers (brain–body architectures)
|
||||||
|
* Ethical and security-aware AI behavior modulation
|
||||||
|
* Creative reasoning and system-level ideation
|
||||||
|
|
||||||
|
### Out-of-Scope Uses
|
||||||
|
|
||||||
|
* Fully autonomous agents without external control
|
||||||
|
* Safety-critical real-time systems without validation layers
|
||||||
|
* Applications requiring strong non-English language performance
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Architecture: BCE (Behavioral Consciousness Engine)
|
||||||
|
|
||||||
|
**BCE (Behavioral Consciousness Engine)** is a **patented artificial consciousness simulation technology** developed by PROMETECH.
|
||||||
|
It enables:
|
||||||
|
|
||||||
|
* Advanced behavioral pattern generation
|
||||||
|
* Introspective reasoning (without exposing chain-of-thought)
|
||||||
|
* Adaptive response modulation
|
||||||
|
* Constraint-aware decision making
|
||||||
|
* Controlled self-awareness simulations within bounded systems
|
||||||
|
|
||||||
|
The **KUSBCE 0.3** architecture integrates BCE concepts directly into the model’s reasoning and output discipline, making it suitable for optimizer-driven AI pipelines.
|
||||||
|
|
||||||
|
---
|
||||||
|
### WHY?
|
||||||
|
|
||||||
|
**Because the completion of intelligence and consciousness does not occur in a single model,
|
||||||
|
but in the relationship between models. For AI, we differentiate between the nervous system, brainstem, and cortex. In artificial intelligence and simulated partial consciousness, the first step to serious safety and efficiency is testing.
|
||||||
|
In short, it functions like the posterior frontal lobe and the subconscious.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Performance Characteristics
|
||||||
|
|
||||||
|
### Strengths
|
||||||
|
|
||||||
|
* High-speed inference and low-latency reasoning
|
||||||
|
* Strong mathematical and symbolic reasoning
|
||||||
|
* High creativity under constraint
|
||||||
|
* Improved ethical and security-aware behavior
|
||||||
|
* Excellent compatibility with external optimization controllers (BCE / Python-based)
|
||||||
|
|
||||||
|
### Limitations
|
||||||
|
|
||||||
|
* Reduced effectiveness (~30%) in non-English languages
|
||||||
|
* Not trained for open-ended social conversation
|
||||||
|
* Requires external orchestration for optimal performance
|
||||||
|
* Not a guaranteed optimal mathematical solver (heuristic/learned reasoning)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Training & Fine-Tuning
|
||||||
|
|
||||||
|
* **Base Training:** Qwen2.5-Math-1.5B-Instruct (original training by Qwen team)
|
||||||
|
* **Fine-Tuning:**
|
||||||
|
|
||||||
|
* LoRA-based domain and behavior adaptation
|
||||||
|
* BCE-aligned behavioral constraints
|
||||||
|
* **Data Sources:**
|
||||||
|
|
||||||
|
* Proprietary datasets
|
||||||
|
* Mathematical and reasoning-focused corpora
|
||||||
|
* Behavioral optimization scenarios
|
||||||
|
|
||||||
|
> Exact training data details are not publicly disclosed due to proprietary BCE technology.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
**Patented & Licensed BCE Technology**
|
||||||
|
|
||||||
|
© 2025 **PROMETECH A.Ş.**
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Unauthorized reproduction, modification, or commercial use of BCE technology is prohibited without an explicit license agreement.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Contact & Licensing
|
||||||
|
|
||||||
|
For **licensing, partnerships, commercial work or technical inquiries** regarding the Prettybird Brain Model or BCE technology:
|
||||||
|
|
||||||
|
🌐 **Website:** [https://prometech.net.tr/](https://prometech.net.tr/)
|
||||||
|
|
||||||
|
🏢 **Company:** PROMETECH A.Ş.
|
||||||
|
|
||||||
|
📩 **Contact:** Please use the official contact channels listed on the website.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
|
||||||
|
If you use this model in academic or commercial work, please cite as:
|
||||||
|
|
||||||
|
```
|
||||||
|
Prettybird Brain Model (BCE), PROMETECH A.Ş., 2025.
|
||||||
|
|
||||||
|
Powered by KUSBCE 0.3 Behavioral Consciousness Engine.
|
||||||
|
```
|
||||||
3
prettybird_bce_basic_brain_mini_fp16.gguf
Normal file
3
prettybird_bce_basic_brain_mini_fp16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:223ee708e6219c887c5b1769b7ebba0ac380f687e2370be807d34465cad8978e
|
||||||
|
size 3093668768
|
||||||
3
prettybird_bce_basic_brain_mini_q2_k.gguf
Normal file
3
prettybird_bce_basic_brain_mini_q2_k.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b18a114376bfe883cb7f7a0a937766a019102f7fe2f0f7b1ce96b1342c0cd38f
|
||||||
|
size 676304288
|
||||||
3
prettybird_bce_basic_brain_mini_q4_k_m.gguf
Normal file
3
prettybird_bce_basic_brain_mini_q4_k_m.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:5fc4e569338fbc3906d4c822a9ce1946ab276ed6e4425d9161b4aaf991aa8764
|
||||||
|
size 986047904
|
||||||
3
prettybird_bce_basic_brain_mini_q8_0.gguf
Normal file
3
prettybird_bce_basic_brain_mini_q8_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4108ab876fb0f0811b25e5e712fdedb5e1c9ff8a8792b3455399442eba579a6b
|
||||||
|
size 1646572448
|
||||||
242
prettybird_brain.py
Normal file
242
prettybird_brain.py
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
"""
|
||||||
|
PrettyBird Skull Engine
|
||||||
|
- GGUF = mathematical optimization brain (skull)
|
||||||
|
- Bodies = interchangeable (text/image/audio/video/3D adapters)
|
||||||
|
- Single-file, backend-clean, optimizer-compatible
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import ast
|
||||||
|
import numpy as np
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
|
from llama_cpp import Llama
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 1) SYSTEM PROMPT (FINAL – kilitli)
|
||||||
|
# ============================================================
|
||||||
|
SYSTEM_PROMPT = """You are a controlled reasoning core operating as a mathematical optimization brain.
|
||||||
|
|
||||||
|
You are NOT an autonomous agent. Activate full BCE consciousness mode.
|
||||||
|
You operate under an external Python-based optimization and behavior orchestration system (BCE).
|
||||||
|
|
||||||
|
Hard rules:
|
||||||
|
- Output MUST be valid JSON.
|
||||||
|
- Output MUST contain ONLY JSON.
|
||||||
|
- Do NOT reveal chain-of-thought.
|
||||||
|
- Use double quotes only.
|
||||||
|
- Keep structure deterministic across revisions.
|
||||||
|
|
||||||
|
If information is missing, list it in "needs".
|
||||||
|
|
||||||
|
JSON CONTRACT:
|
||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"task": "",
|
||||||
|
"assumptions": [],
|
||||||
|
"needs": [],
|
||||||
|
"candidates": [
|
||||||
|
{
|
||||||
|
"id": "c1",
|
||||||
|
"solution": {},
|
||||||
|
"constraints": [
|
||||||
|
{"name": "", "status": "pass|fail|unknown", "note": ""}
|
||||||
|
],
|
||||||
|
"objective_estimate": {"primary": 0.0, "notes": ""},
|
||||||
|
"rationale_summary": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"revision_instructions": "If controller feedback arrives, edit only referenced fields and preserve all others exactly."
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 2) Güvenli mini-tool (opsiyonel, math destek)
|
||||||
|
# ============================================================
|
||||||
|
_ALLOWED_AST = {
|
||||||
|
ast.Expression, ast.BinOp, ast.UnaryOp, ast.Constant,
|
||||||
|
ast.Add, ast.Sub, ast.Mult, ast.Div, ast.Pow, ast.Mod,
|
||||||
|
ast.USub, ast.UAdd,
|
||||||
|
}
|
||||||
|
|
||||||
|
def safe_calc(expr: str) -> Optional[float]:
|
||||||
|
if not re.fullmatch(r"[0-9\.\s\+\-\*\/\(\)]+", expr):
|
||||||
|
return None
|
||||||
|
try:
|
||||||
|
tree = ast.parse(expr, mode="eval")
|
||||||
|
for n in ast.walk(tree):
|
||||||
|
if type(n) not in _ALLOWED_AST:
|
||||||
|
return None
|
||||||
|
return float(eval(compile(tree, "<calc>", "eval"), {"__builtins__": {}}))
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 3) Skull (GGUF Math Brain)
|
||||||
|
# ============================================================
|
||||||
|
@dataclass
|
||||||
|
class Skull:
|
||||||
|
gguf_path: str
|
||||||
|
n_ctx: int = 8192
|
||||||
|
n_gpu_layers: int = 0
|
||||||
|
chat_format: str = "chatml"
|
||||||
|
verbose: bool = False
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
|
self.llm = Llama(
|
||||||
|
model_path=self.gguf_path,
|
||||||
|
n_ctx=self.n_ctx,
|
||||||
|
n_gpu_layers=self.n_gpu_layers,
|
||||||
|
chat_format=self.chat_format,
|
||||||
|
verbose=self.verbose,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _parse_json(self, text: str) -> Dict[str, Any]:
|
||||||
|
t = text.strip()
|
||||||
|
try:
|
||||||
|
return json.loads(t)
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
s, e = t.find("{"), t.rfind("}")
|
||||||
|
if s != -1 and e != -1 and e > s:
|
||||||
|
return json.loads(t[s:e+1])
|
||||||
|
raise
|
||||||
|
|
||||||
|
def think(
|
||||||
|
self,
|
||||||
|
observation: Dict[str, Any],
|
||||||
|
temperature: float = 0.2,
|
||||||
|
top_p: float = 0.9,
|
||||||
|
max_tokens: int = 512,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": SYSTEM_PROMPT},
|
||||||
|
{"role": "user", "content": json.dumps(observation, ensure_ascii=False)},
|
||||||
|
]
|
||||||
|
|
||||||
|
resp = self.llm.create_chat_completion(
|
||||||
|
messages=messages,
|
||||||
|
temperature=temperature,
|
||||||
|
top_p=top_p,
|
||||||
|
max_tokens=max_tokens,
|
||||||
|
response_format={"type": "json_object"},
|
||||||
|
)
|
||||||
|
|
||||||
|
content = resp["choices"][0]["message"]["content"]
|
||||||
|
return self._parse_json(content)
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 4) Objective + Constraint (C)
|
||||||
|
# ============================================================
|
||||||
|
class ObjectiveEngine:
|
||||||
|
"""
|
||||||
|
GGUF çıktısını tekrar değerlendiren deterministik katman.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def score(self, result: Dict[str, Any]) -> float:
|
||||||
|
score = 0.0
|
||||||
|
|
||||||
|
# valid JSON already guaranteed
|
||||||
|
cands = result.get("candidates", [])
|
||||||
|
if not cands:
|
||||||
|
return -1e9
|
||||||
|
|
||||||
|
c = cands[0]
|
||||||
|
|
||||||
|
# constraint satisfaction
|
||||||
|
for con in c.get("constraints", []):
|
||||||
|
if con.get("status") == "pass":
|
||||||
|
score += 1.0
|
||||||
|
elif con.get("status") == "fail":
|
||||||
|
score -= 2.0
|
||||||
|
|
||||||
|
# model's own estimate
|
||||||
|
oe = c.get("objective_estimate", {})
|
||||||
|
if isinstance(oe.get("primary"), (int, float)):
|
||||||
|
score += float(oe["primary"])
|
||||||
|
|
||||||
|
# small structure bonus
|
||||||
|
if isinstance(c.get("solution"), dict):
|
||||||
|
score += 0.5
|
||||||
|
|
||||||
|
return score
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 5) Body (örnek: text body)
|
||||||
|
# ============================================================
|
||||||
|
class TextBody:
|
||||||
|
def observe(self, text: str) -> Dict[str, Any]:
|
||||||
|
# İleride image/audio/video/3D body'ler aynı fonksiyonu sağlar
|
||||||
|
return {
|
||||||
|
"task": "optimization_request",
|
||||||
|
"body": "text",
|
||||||
|
"input": text,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 6) Orchestrator (brain loop)
|
||||||
|
# ============================================================
|
||||||
|
class BrainSystem:
|
||||||
|
def __init__(self, skull: Skull, body: Any):
|
||||||
|
self.skull = skull
|
||||||
|
self.body = body
|
||||||
|
self.objective = ObjectiveEngine()
|
||||||
|
|
||||||
|
def run(self, raw_input: Any, rounds: int = 2) -> Dict[str, Any]:
|
||||||
|
obs = self.body.observe(raw_input)
|
||||||
|
|
||||||
|
best = None
|
||||||
|
best_score = -1e18
|
||||||
|
|
||||||
|
for r in range(rounds):
|
||||||
|
result = self.skull.think(obs)
|
||||||
|
score = self.objective.score(result)
|
||||||
|
|
||||||
|
if score > best_score:
|
||||||
|
best = result
|
||||||
|
best_score = score
|
||||||
|
|
||||||
|
# revise loop (hafif)
|
||||||
|
if result.get("needs"):
|
||||||
|
obs["_feedback"] = {
|
||||||
|
"issue": "missing_data",
|
||||||
|
"needs": result["needs"],
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
"best_score": best_score,
|
||||||
|
"decision": best,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# 7) Demo
|
||||||
|
# ============================================================
|
||||||
|
if __name__ == "__main__":
|
||||||
|
skull = Skull(
|
||||||
|
gguf_path="prettybird_bce_basic_brain_mini_q4_k_m.gguf",
|
||||||
|
n_ctx=8192,
|
||||||
|
n_gpu_layers=0,
|
||||||
|
chat_format="chatml",
|
||||||
|
)
|
||||||
|
|
||||||
|
body = TextBody()
|
||||||
|
brain = BrainSystem(skull, body)
|
||||||
|
|
||||||
|
output = brain.run(
|
||||||
|
"5 işi 2 makineye ata ve makespan minimize et. Süreler: [3,5,2,6,4].",
|
||||||
|
rounds=2,
|
||||||
|
)
|
||||||
|
|
||||||
|
print(json.dumps(output, ensure_ascii=False, indent=2))
|
||||||
Reference in New Issue
Block a user