- Model:
distiluse-base-multilingual-cased-v1 - Vektör Boyutu: 512 dimensions
- Maksimum Token Limiti: 128 tokens
⚠️ - Tokenizer: DistilBertTokenizerFast
Model embedding oluştururken 128 token limit kullanır, ANCAK:
- CSV satırları: Token limiti UYGULANMAZ
- Her satır: Tek bir belge olarak saklanır (parçalanmaz)
- Uzun satırlar: Sorunsuz çalışır (ChromaDB otomatik işler)
- 128+ token: Tamamen normal ve güvenli!
- PDF metinleri: 128 token'lık parçalara bölünür
- Otomatik splitting: TextSplitter otomatik yapar
- Optimal boyut: 128 token/chunk
128 tokens ≈ 85-100 kelime
≈ 500-600 karakter
≈ 2-3 kısa paragraf
- ✅ KIsa satırlar: 50-100 token → Mükemmel
- ✅ Orta satırlar: 100-300 token → İyi
- ✅ Uzun satırlar: 300-1000 token → Sorun yok!
- ✅ Çok uzun: 1000+ token → ChromaDB halleder!
- Model Bilgisi Gösterimi - Başlangıçta model özellikleri
- Dosya İşleme Progress Bar - Kaç dosya işlendi
- Vektör Oluşturma Progress - Kaç belge vektörleştirildi
- Token Analizi - Limit aşan belgeler uyarısı
- Hız Göstergesi - Saniyede kaç döküman işleniyor
- Kalan Süre Tahmini - Ne kadar süre kaldı
- Batch İşleme - Büyük veri setleri için optimizasyon
📂 Processing files: 100%|████████████| 5/5 [02:30<00:00, 30.2s/file]
🔄 Vectorizing documents: 100%|███| 1000/1000 [00:45<00:00, 22.3 doc/s]
✅ Vectorization complete! Total time: 45.23s
⚡ Average speed: 22.10 documents/second
python check_vectors.pyfrom file_processing.file_processor import FileProcessor
processor = FileProcessor(db_manager, model_name, collection)
processor.process_files(file_paths, show_vector_info=True)from utils.vector_checker import VectorChecker
# Metin kontrolü
result = VectorChecker.check_text_length(text, model_name)
print(f"Token count: {result['token_count']}")
print(f"Exceeds limit: {result['exceeds_limit']}")
# Belge analizi
stats = VectorChecker.analyze_documents(documents, model_name)
print(f"Documents exceeding limit: {stats['exceeding_limit_count']}")Büyük CSV dosyaları artık batch halinde işleniyor:
- Batch Size: 100 belge/batch
- Bellek Optimizasyonu: Büyük dosyalar için daha az RAM kullanımı
- İlerleme Takibi: Her batch'in durumu gösteriliyor
title,content,category
Deep Learning,Deep learning uses neural networks with multiple layers for pattern recognition.,AItitle,content,category
Machine Learning,"Machine learning is a branch of artificial intelligence that enables computers to learn from data without explicit programming. It includes supervised learning, unsupervised learning, and reinforcement learning approaches. Common algorithms include decision trees, neural networks, and support vector machines.",AItitle,content,category
AI History,"Artificial intelligence has a long and fascinating history dating back to the 1950s when pioneers like Alan Turing and John McCarthy began exploring the possibility of creating machines that could think. The field has seen multiple waves of enthusiasm and disappointment, known as AI winters and springs. Early successes in game playing and theorem proving gave way to more practical applications in expert systems. Today, with the advent of deep learning, big data, and powerful computing resources, AI is experiencing unprecedented growth and success across numerous domains including computer vision, natural language processing, robotics, and autonomous systems.",HistoryNot: Tüm örnekler geçerlidir! CSV satırları için token limiti yoktur.
Çözüm:
- CSV içeriğini kısaltın
- İçeriği birden fazla satıra bölün
- Sadece önemli bilgileri tutun
Çözüm:
- Batch size'ı artırın (100 → 500)
- Daha az sütun seçin (columns_to_combine)
- Model cache'ini kontrol edin
Çözüm:
- Batch size'ı küçültün (100 → 50)
- Dosyaları tek tek işleyin
- ChromaDB persistent mode kullanın
- RAM: 8GB+ (büyük dosyalar için 16GB)
- Disk: 2GB+ (model + vektör DB için)
- CPU: Multi-core (paralel işleme için)
İlk kullanımda model otomatik indirilir:
- distiluse-base-multilingual-cased-v1: ~500MB
- Kısa ve öz tutun (max 100 kelime/satır)
- Gereksiz bilgi eklemeyin
- Önemli anahtar kelimeleri başa koyun
- Test edin:
check_vectors.pyile kontrol edin
- Önce kontrol:
check_vectors.pyçalıştırın - Küçük test: 5-10 satırlık CSV ile test edin
- Token analizi: Uyarı varsa düzeltin
- Tam işlem: Tüm veriyi işleyin
- Batch işleme kullanın (büyük dosyalar için)
- Progress bar takip edin (sorun varsa durdurun)
- Vector info gösterin (ilk çalıştırmada)
- Stats kaydedin (sonraki optimizasyonlar için)
✅ VectorChecker: Token ve vektör boyutu kontrolü ✅ ProgressTracker: İlerleme çubukları ve hız göstergeleri ✅ VectorizeProgress: Özel vektörizasyon takibi ✅ BatchProcessor: Batch halinde işleme ✅ Model Info Display: Başlangıçta model bilgileri ✅ Token Analysis: Otomatik limit kontrolü ✅ Speed Metrics: İşlem hızı ve kalan süre
============================================================
📊 EMBEDDING MODEL INFORMATION
============================================================
Model Name: distiluse-base-multilingual-cased-v1
Vector Dimension: 512
Max Sequence Length: 128 tokens
Tokenizer: DistilBertTokenizerFast
============================================================
📂 Processing files: 3/3 [01:45<00:00, 35.2s/file]
🔄 Adding 150 documents to ChromaDB...
🔄 Vectorizing documents: 150/150 [00:23<00:00, 6.5 doc/s]
✅ Vectorization complete! Total time: 23.45s
⚡ Average speed: 6.40 documents/second
============================================================
✅ Processing Complete!
============================================================
📊 Total files processed: 3
📄 Total documents added: 150
💾 Collection size: 174
============================================================
def my_progress(n):
print(f"✓ {n} documents processed")
processor.process_files(files, progress_callback=my_progress)Eğer daha uzun metinlere ihtiyacınız varsa:
# Daha uzun context destekli model
model_name = "sentence-transformers/paraphrase-multilingual-mpnet-base-v2"
# Max tokens: 384 (3x daha uzun!)| Özellik | Önceki | Şimdi |
|---|---|---|
| İlerleme Takibi | ❌ Yok | ✅ Var |
| Token Kontrolü | ❌ Yok | ✅ Var |
| Hız Göstergesi | ❌ Yok | ✅ Var |
| Batch İşleme | ❌ Yok | ✅ Var |
| Kalan Süre | ❌ Yok | ✅ Var |
| Model Bilgisi | ❌ Yok | ✅ Var |