Mistral Clipstral: Multimodal Embeddings, Video Semantic Search and Local Knowledge-Base Architecture

Explore Clipstral for local image and video search, private knowledge bases and multimodal RAG, with segment retrieval, index storage, migration and privacy.

Published · 24 min readXBSTACK
Evidence 15 cited sources
On this page

Research cutoff: December 3, 2026. Mistral AI released Clipstral (Mistral Multimodal Embed) on November 30. This study uses that release to examine searchable, locatable and citable personal photo and video collections. It combines original source analysis with a retrieval architecture, storage model, evaluation protocol and migration design. XBSTACK has not executed Clipstral inference and claims no measured device compatibility or performance.

Conceptual research cover; images and videos share a vision encoder, detailed below. No partnership or verified product integration is implied.

Adoption decision: Evaluate Clipstral as a natural-media retrieval channel alongside separate text, document-vision and evidence channels. Validate sampling coverage, temporal localization, migration and device resources before adoption. This study includes actual FFmpeg synthetic-media experiments but no Clipstral inference.

1. Context, release significance and the evolution of multimodal retrieval

How can AI reduce the manual work of organizing photos and videos?

For personal data management, useful applications of AI automation include automatic media indexing, natural-language search and candidate grouping, reducing the need to open files individually, tag them by hand or repeatedly browse photo albums. In a personal AI assistant, this is a content discovery capability, not browser automation or general-purpose task execution. Clipstral embeddings can help retrieve candidates, but they cannot replace human confirmation of important content or establish that fully automated organization has already been implemented.

Consider a hypothetical query: “Find the hiking video where I crossed a wooden bridge and then saw a waterfall.” File names may be uninformative; OCR only captures visible text; transcripts may never mention the scene. A vector for an entire video can identify a candidate without identifying a few seconds or establishing event order.

Distinguish cross-modal retrieval, temporal localization, evidence confirmation and answer generation. Clipstral primarily addresses retrieval; the other three require application design. This article focuses on natural-media segments, not another general visual document retrieval guide.

From CLIP to temporal representations: why search needs a dedicated encoder

Generative models and representation models have different jobs. A generator can explain a small set of already retrieved items. A representation model maps assets into a comparable vector space so that a large corpus can be indexed in advance. Sending every photo and video through a generator on every query repeats decoding and inference work. Dual encoders move much of that work to ingestion, but the compression can discard details that a future query needs.

The original CLIP study established the usefulness of learning visual representations from natural-language pairs. SigLIP studies a pairwise sigmoid objective rather than global batch softmax normalization. Clipstral follows the dual-encoder approach, extending its vision tower with temporal processing and aligning it with multilingual text. Differences in model size, data and training objectives prevent attributing all benchmark differences to the temporal module alone.

For a personal media library, first define the retrieval unit. Finding a photo, locating a video file, locating a three-second event inside a video and locating a spoken sentence require different data structures and acceptance criteria. A file-level vector can be useful for initial discovery without being adequate for every temporal-localization task. A stronger model does not automatically justify a coarser index: representation, sampling, candidate granularity and source evidence must be designed together.

2. Dual-encoder architecture and contrastive-learning mathematics

How the dual encoder works

Clipstral shared vision encoder, video-only temporal encoder and text path to 1024-dimensional embeddings

Conceptual illustration of the documented architecture, not an inference screenshot.

The announcement, technical report and model card describe a 1.24B dual encoder that maps text, images and video into a shared 1024-dimensional space. The weights and inference code use Apache-2.0. It is not a generative multimodal chatbot.

Section 3 of the report specifies:

ComponentParametersRole
Vision Transformer409MSpatial features for images or individual frames
Four-layer spatio-temporal encoder50MPatch relationships across frames
Causal text encoder783MMultilingual text representation

The 24-layer ViT uses 2D RoPE with 14-pixel patches and 2×2 patch merging; global max pooling and projection yield an image embedding. Video reuses that vision tower before a four-layer spatio-temporal encoder with 3D RoPE processes patch tokens across frames, then global max pooling and projection. The 14-layer causal text tower uses 1D RoPE and projects the EOS token’s final hidden state. Each input independently yields an L2-normalized FP32 vector. Section 3.2 applies symmetric InfoNCE to image-text and video-text pairs; learned temperature scaling of normalized similarities does not turn them into event probabilities. The temporal encoder belongs only to the video path.

For normalized query q and asset v, cosine similarity is q·v. The application advantage of a dual encoder is that media vectors can be computed offline, avoiding a generative model call for every photo on every query. Similarity is not a calibrated probability or verified fact. Pin the model, preprocessing, normalization and distance measure. The default keep_ratio transform uses a 448-pixel long side, rounding to multiples of 28 (14-pixel patches and 2×2 merging). Squash and center_crop trade off distortion and boundary loss; OpenCV and torchvision resizing may differ. Include transforms, sizes, interpolation, sampling, normalization and model revision in cache keys. The default is not the per-dataset best setting in the 37-benchmark comparison.

Contrastive learning and its engineering consequences

Let a visual encoder produce v_i and a text encoder produce t_j, with both projections L2-normalized. The similarity matrix has entries S_ij=γ(v_i·t_j), where γ is a learned inverse temperature. For B matched pairs, symmetric InfoNCE can be viewed as two classification problems: find the correct text for each visual input and the correct visual input for each text. The loss averages negative log softmax probabilities for the matched entries across both directions. See Section 3.2 of the Clipstral report and the original CLIP paper.

Temperature controls the contrast among scores. A larger inverse temperature sharpens the distinction between high and low scores, but does not automatically turn a similarity into the probability that an event occurred. In personal collections, one photograph may have many valid descriptions and different photographs may depict the same concept. Treating every off-diagonal training pair as negative can introduce false negatives; batch labels are not interchangeable with application relevance judgments.

For example, a query about a mountain road after rain may correctly retrieve many photographs. Finding a particular trip also requires dates, locations or other evidence. Evaluating only whether the first result is a particular file can undervalue relevant alternatives; evaluating whether any rainy image appears can overstate exact-file discovery. Specify whether the benchmark concerns one known target, multiple relevant items, or localization of evidence.

When cosine, inner product and Euclidean distance agree

For unit vectors q and v, squared Euclidean distance satisfies ||q−v||²=2−2(q·v). With exact arithmetic and correct normalization, descending inner-product order matches ascending Euclidean-distance order. Without normalization, vector magnitude also influences the inner product. Finite precision, quantization, approximate search and ties can alter exact rankings.

Our V6 reference experiment uses artificial two-dimensional unit vectors with an inner product of 0.96 and squared Euclidean distance of 0.08. Zero and non-finite vectors are rejected. We also serialize 1,024 artificial unit-vector components generated using a fixed seed to little-endian FP32, read them back and validate the norm; the payload is 4,096 bytes. These are arithmetic and data-contract tests, not measurements of Clipstral quantization quality or semantic accuracy. Before insertion, an index writer should verify dimensionality, finiteness, normalization and model generation, quarantining invalid records rather than corrupting a larger index.

3. Visual encoding, temporal modeling and training

ViT, patch merging, RoPE and the cost of spatio-temporal tokens

A vision transformer first represents local image patches rather than mapping the entire image directly into a single vector. With the reported 14-pixel patch size and 2×2 merging, a square 448-pixel input has a 32×32 initial grid (1,024 tokens), reduced to 16×16 (256 tokens). Sixteen frames therefore provide 4,096 merged tokens to temporal processing. At 896 pixels, there are 4,096 initial spatial tokens per frame, 1,024 merged tokens and 16,384 merged tokens across 16 frames.

These are geometric examples, excluding special tokens, masks, actual preprocessing and implementation details. For full dense attention across these temporal tokens, pairwise interactions grow quadratically: the fourfold token increase implies roughly sixteenfold pairwise interactions. It does not establish a sixteenfold increase in measured memory or latency. Attention kernels, grouping and device implementations affect actual cost. Parameter count alone does not predict high-resolution video throughput.

RoPE encodes positional relationships into attention. Two-dimensional positions represent spatial relationships; three-dimensional positions add the temporal axis. The mechanism can distinguish positions of observed patches, but cannot reconstruct missing observations. If a short event falls between sampled frames, positional encoding does not restore the missing image. The temporal encoder can learn cross-frame features without guaranteeing exact event boundaries, so the index still needs source ranges and actual sample timestamps.

Why an average of frame embeddings loses order

The mean of independently encoded frames is invariant to their order. For artificial frame vectors (1,0), (0,2) and (3,1), the mean is (4/3,1). Reversing them produces exactly the same mean; the local V6 script verifies this invariant. Direct max pooling over independent frame features likewise ignores order. However, features produced by a temporal encoder before pooling may already contain order-sensitive information.

It is therefore inappropriate to infer the complete Clipstral model’s temporal capability from its pooling function alone. Compare an order-insensitive frame baseline with a temporal model on queries that distinguish event sequences, including reversed videos and visually similar static scenes. No such learned-model comparison has been run locally.

Temporal capability and sampling limits

Averaging independent frame embeddings can lose event order. Clipstral’s temporal layer relates patches across frames, but the report’s limitations section identifies training on short clips, approximately a minute or less, represented by 16 frames. Longer clips need sampling, segmentation or aggregation. The current encoder accepts an image, a video or text separately; it does not accept arbitrary joint multimodal queries and is not a specialized audio, document or code encoder.

For a 60-second clip represented by 16 uniformly spaced frames, the interval is roughly four seconds. A brief event may never be sampled. Even perfect recognition of observed frames cannot establish an unobserved action. This is an arithmetic example, not a model experiment.

Fixed-compute training ablation. Appendix C.2 finds eight-frame training best for retrieval but weakest for classification; 32 frames reverse the trade-off, and 16 is a compromise. That training result does not establish the optimal inference frame count. Table 9 reports 60.7% video retrieval using temporal processing over frame embeddings versus 62.9% using patch tokens with alignment, at matched training FLOPs. Content-aware selection showed no measurable gain in the short-clip ablation; longer media still need testing.

Two-stage training and temporal-encoder alignment

Section 3.2 of the technical report describes image-text training followed by video adaptation. Stage one draws from a deduplicated pool of roughly 7.6 billion image-text pairs and runs on 512 H100 GPUs for about 6.1 days. Video training uses public-source and curated mixtures, aligns the added temporal encoder and then fine-tunes the combined model. These are author-reported resources and methods, not an XBSTACK reproduction; pool size is not total sample exposure.

The rationale for staged training is to adapt a newly initialized temporal component to an existing visual-textual representation rather than learning every component from a random initialization simultaneously. Later fine-tuning can still change earlier image-text ranking behavior. An adoption evaluation must retain regression tasks for earlier modalities instead of examining only video scores. An unchanged output dimension of 1,024 is not evidence that vectors from different revisions are interchangeable.

4. Official benchmarks, model comparisons and limitations

Reading the 37-benchmark evaluation

The vendor’s zero-shot protocol covers six image-retrieval, 18 image-classification, five video-retrieval and eight video-classification tasks. For each dataset it retains the best result across 224, 336, 672 and 1036 pixels and three transforms. Qwen3-VL-Embedding and EmbeddingGemma 2 use task-tuned instructions. Selected official means follow (retrieval is bidirectional mean R@1; classification is top-1 accuracy in percent). These are not XBSTACK measurements.

ModelParametersImage retrievalVideo retrievalVideo classification
Clipstral1.24B80.264.057.0
EmbeddingGemma 20.44B75.861.049.9
Qwen3-VL-Embedding-2B2.13B77.561.957.8
Qwen3-VL-Embedding-8B8.14B82.766.261.7

Under that protocol, Clipstral gains 4.4 and 3.0 percentage points over 0.44B EmbeddingGemma on image and video retrieval. The 2B Qwen model leads it in video classification by 0.8 points, and the larger 8B reference leads all three shown metrics. This is not universal dominance over larger models. The vendor reports XM3600 R@1 of 59.7 across 36 languages; that is not a measured Chinese personal-photo score. Best-over-transform results do not establish performance on a fixed phone configuration or a matched-resource comparison.

The V*-classification benchmark examines small details in native-resolution images. On full images, tested models remain within roughly ten points of chance. Table 8 reports 191 items: Clipstral full-image accuracy 40.3%, oracle crop 67.5%, chance 36.0%, and human full-image mean 98.6%. The 27.2-point difference presupposes the target location; it is not a promised automatic detector gain. Resolution and aspect-ratio support are therefore not equivalent to reliable tiny-object recognition. Use crops, OCR or specialized localization for fine text, gauges or distant objects, retaining source coordinates.

Return from aggregate scores to real tasks: four different benchmark families

Tables 2–5 of the technical report separate image retrieval, image classification, video retrieval and video classification. These selected official aggregate results complement the earlier selection table. The image-classification average includes the PA-100K mAP entry, with most others using top-1 accuracy; the entries should not be described as identical metrics. Per-dataset resolution and transform selection is not a fixed-device XBSTACK A/B.

ModelImage retrievalImage classificationVideo retrievalVideo classification
Clipstral 1.24B80.279.264.057.0
PE-Core-G 2.42B71.081.660.955.1
SigLIP2-So400m 1.14B73.177.946.749.3
EmbeddingGemma 2 0.44B75.8See source table61.049.9
VideoPrism-LvT-L 0.58BNot compared in this tableNot compared in this table58.551.5

Static-image classification and media retrieval optimize different tasks. PE-Core-G has higher average image classification than Clipstral but lower retrieval averages. A classification ranking is not a personal-photo-search decision, and cross-modal recall does not establish reliable recognition of fine print, tiny objects or exact serial numbers. Source navigation and detailed evidence need separate OCR, crop, temporal-localization and human-label checks.

Separate t2i, i2t, t2v and v2t

Text-to-image and image-to-text searches can have different candidate sets and labeling structures. For example, the reported MSR-VTT text-to-video R@1 for Clipstral is 39.6 versus 73.4 in the reverse direction. Averaging obscures that asymmetry. Personal media search should report text-to-image and text-to-video directions independently rather than substituting bidirectional means for reader experience. Cross-language consistency likewise needs separate Chinese and English tasks; a multilingual average is not a Chinese accuracy estimate.

Stratify the test set by ordinary scenes, visually similar alternatives, event order, small details, text/vision conflicts, no-answer cases and multiple relevant assets. Labels must specify acceptable asset sets and temporal intervals. For multiple positives, distinguish the fraction of relevant items recovered from the proportion of queries with at least one hit; the denominators differ. Freeze splits and channels before threshold calibration and reranking. Selecting settings on the final test set can overstate generalization. The report’s per-benchmark best settings are references, not expected scores under a fixed phone budget.

Users may want natural-language search of local photos and videos even without descriptive filenames or tags. Shared image-text embeddings can retrieve candidates; precise names, identifiers and subtitles benefit from FTS, OCR or ASR. The MaterialSearch project and FrameScout project illustrate this application need. Their documented features are not XBSTACK measurements of those tools or Clipstral.

ChannelAppropriate taskBoundary
FTS / OCRExact names, identifiers, subtitles and visible textLimited when text is absent
EmbeddingGemma 2 270M textLocal semantic text retrievalXBSTACK’s Mac experiment tested text, not 440M multimodal inference
ClipstralPhotos, video segments and multilingual media searchSegment embedding, not fact generation or audio encoding
Granite Embedding Vision R2Visual document-page retrieval and reranking researchDocument benchmarks do not establish natural-video performance
Qwen3-VL-EmbeddingCandidate visual retrieval baselineActual resource, instructions and format compatibility need testing

This is a task allocation, not a shared benchmark ranking. See the Local AI hub for device deployment boundaries and OwnRAG hybrid retrieval for lexical/vector fusion and source verification. The existing EmbeddingGemma 2 local text experiment provides text evidence, and the Granite Vision R2 study addresses visual document pages. Clipstral’s distinct role is a media and temporal-segment channel.

A matched evaluation protocol for personal media

Use licensed, non-sensitive image and video samples covering similar appearances, action order, brief events, visual/subtitle conflicts, tiny details, Chinese/English paraphrases and no-answer queries. Annotate correct asset IDs, allowed time ranges and supporting evidence independently rather than using a generative answer as ground truth.

Pin dataset split, revision, input size, cropping, frame count, windows, distance and ANN parameters. Compare FTS/OCR/ASR, an independent-frame baseline, Clipstral and actually runnable alternatives on the same hardware. Report Recall@K (e.g., Recall@1/5), MRR or nDCG, temporal IoU, wrong-asset citations and false retrieval on no-answer cases; also measure indexing throughput, peak RSS, cold/warm p50/p95 latency, actual disk usage and failures. Temporal IoU is the duration of intersection divided by the duration of union of predicted and annotated intervals, not ranking success.

Set adoption criteria in advance: repeatable improvement on specified media tasks within memory, time and privacy budgets, without regressions in existing text/document search. Publish the failure distribution instead of a few successful screenshots. All metrics here are a proposed protocol, not completed inference results.

5. Source inspection and independent media experiments

What the implementation actually confirms

On the research date, we inspected the official Hugging Face modeling_mistral_contrastive.py. The text path checks for an EOS token, projects its representation and applies FP32 L2 normalization by default. Variable-resolution images can be grouped by their spatial grids. Video processing encodes frame patches, passes the result through temporal processing, pooling and projection, and returns normalized vectors.

The code exposes separate methods for obtaining text, image and video features. A combined forward path returns outputs associated with visual-text comparison. This is not the same as concatenating an image and text into one joint query embedding. This is static inspection of the public main file; it was not verified byte for byte against the earlier pinned GitHub HEAD, and no remote model code was executed.

For integration, avoid calling custom model methods directly from UI events. An EncoderAdapter should own model revision, input validation, preprocessing, output dimension and error classification; a task system should handle cancellation, pause, recovery and budgets. Indexing and query encoding must use compatible revisions and preprocessing contracts. The security boundary also includes dependency review, process isolation, scoped file access and restricting network access when appropriate. Open code facilitates inspection but is not evidence of completed security testing.

XBSTACK independent index-contract verification (not model inference)

On December 3, 2026, local macOS arm64, Python 3.10.2 and SQLite 3.35.5 tests used temporary databases and synthetic timelines. Seven shadow-index assertions passed: missing vectors or source-hash conflicts blocked activation, the old generation remained active, a complete generation switched and persisted across reopen, the old generation could be restored, and new source imports made an unsynchronized generation ineligible. Six media-window and payload assertions also passed, including 1,000 seeded valid window configurations (seed 20261203) with no uncovered tails, duplicate intervals or out-of-range intervals. FP32 serialization of 1024 values produced 4096 bytes. This checks synthetic timelines, sequential SQLite transactions and raw payload only. That fixture does not test decoding, ANN, inference, concurrent imports, crash injection or performance and does not establish model quality or production migration safety.

Actual media decoding experiment: information can disappear at sampling

Synthetic video sampling coverage at 16, 48 and 600 frames

FFmpeg synthetic sampling coverage, not Clipstral semantic retrieval. Schematic timeline, not to scale; valid indices 0–599, last frame 59.9 s. Sixteen frames miss both events; 48 capture red only; all 600 capture both.

On the same Mac, FFmpeg 8.1 encoded and decoded a synthetic lossless FFV1 video of 60 seconds, 10 fps and 32×32 pixels, totaling 600 frames. The RGB round trip was byte-identical. A red event occupies frames 15–24 (1.5–2.4 seconds), and a green event occurs only at frame 233 (23.3 seconds). Compare global 16-frame sampling, 16 samples from each 30-second window at 15-second stride, and full-frame inspection.

StrategyUnique sampled framesRed eventGreen event
Global uniform sampling16NoneNone
Three overlapping windows48Frame 20None
Full frame sequence600Frames 15–24Frame 233

All four checks passed. Detection uses known pixel colors, not Clipstral or another visual model. This establishes coverage in a deterministic synthetic constant-frame-rate fixture, not real semantic recall, decoder throughput or variable-frame-rate support. Real media require PTS preservation, VFR and rotation handling, explicit decode failures, labeled candidate recall and downstream temporal IoU.

Actual variable-frame-rate experiment: frame number is not a universal timestamp

The earlier 60-second constant-rate fixture demonstrates that sparse sampling can miss short events. This separate test verifies a timeline error. With FFmpeg 8.1 and ffprobe, four 32×32 color frames were encoded losslessly with FFV1, preserving presentation timestamps of 0, 100, 400 and 900 milliseconds. All four decoded frames exactly match the input pixels.

Zero-based frameActual PTS (ms)Assumed 10 FPS conversion (ms)
000
1100100
2400200
3900300

The interval [350,750) ms contains frame 2 when using actual PTS, but no frame when using the fixed-10-FPS conversion. All seven assertions passed: frame count, pixel identity, irregular timestamps, two timestamp mismatches and both interval selections. This is not a Clipstral semantic-search measurement and does not establish compatibility with every variable-frame-rate container or codec.

A media decoder should provide presentation timestamps and time base; a segmenter should create half-open intervals on a consistent timeline; sampling should preserve actual PTS rather than just sample numbers. After editing or replacement, verify source digest and version. If time mapping cannot be established, do not show a falsely precise seek position. Source-jump tests must check the candidate, actual playback position, source revision and temporal error.

The local script 2026-12-03-clipstral-v6-vfr-probe.py and its JSON result are retained. No personal media, external video or model weights were used.

Additional mathematical and index-contract checks

The local V6 script 2026-12-03-deep-research-v6-contracts.py and corresponding JSON record eleven passing Clipstral-themed reference assertions: normalized vector distances, invalid-vector rejection, permission-aware ranking, RRF, temporal IoU, order-invariance of mean pooling and raw serialization. These are separate from the actual FFmpeg synthetic decoding and SQLite shadow-generation experiments described earlier. They cannot be combined into a model accuracy statistic. The script remains a local research asset and is not yet a public GitHub reproduction.

Evidence and remaining verification boundaries

Experimental layerIndependent evidenceStatus here
Mathematical and index contractsNormalization, permissions, fusion, IoU, generation switchReference experiments executed
Actual media softwareCFR/VFR decoding, short-event sampling, PTSSynthetic media experiments executed
Official weight inferenceActual text, image and video embeddingsNot executed
MLX or other quantized comparisonMatched corpus, ranking, memory and timingNot executed
Product integrationDevice energy, concurrency, permissions, source jumpsNot executed

6. Long-video semantic retrieval and precise evidence localization

Long-video segmentation and second-stage sampling

Use coarse retrieval over windows or scenes, followed by higher-density sampling or direct source inspection. Verify the final timestamp using independent evidence such as source frames, OCR or ASR. Sparse events may require scene-change or motion-aware resampling rather than a larger vector.

Multichannel retrieval and source-evidence chain

Multimodal retrieval, integer-millisecond bounds and source verification

Proposed application-level evidence chain. 83456 and 96789 are illustrative milliseconds, not actual query logs; retrieval is not evidence confirmation.

How can I search a long video and jump to a specific moment?

A video knowledge base should do more than return a similar filename. Index source identity, segment time ranges and sampled timestamps; after retrieval, inspect the original frames, subtitles or audio to distinguish a candidate from a confirmed event. The Alibaba Cloud video semantic retrieval documentation illustrates separate segmentation, vectorization and keyframe processing. This is application-level task decomposition, not a claim that Clipstral provides those cloud features or guaranteed second-level recall.

On import, retain immutable asset_id, source hash, media type, permissions and decode metadata. Route text to normalization, FTS and text embeddings; images to visual embeddings and OCR; video to scene segments, sampled frames, visual embeddings, timed ASR and OCR. Preserve source identity. A query chooses channels within the user’s authorized scope, each with its own model and preprocessing.

A minimal record can contain asset_id, segment_id, start_ms, end_ms, frame_timestamps_ms, source_hash, embedding_model_id, model_revision, preprocess_version, dimension, index_generation and ACL. Return to the original segment and verify time and content; cite the original asset rather than a vector or similarity score.

Near-identical thumbnails are not necessarily the same evidence object. Repeated scenes in different videos or positions retain distinct segment IDs. Near-duplicate detection assists organization; it must not silently delete original files.

Temporal IoU and evidence interfaces

Temporal localization is a separate quality dimension. For predicted interval [1000,4000) ms and labeled interval [2000,5000) ms, the intersection is 2,000 ms and the union is 4,000 ms, giving temporal IoU 0.5. Adjacent non-overlapping half-open intervals have zero IoU. Both arithmetic assertions passed locally. High file recall does not imply precise temporal localization, and retrieving the wrong moment in the correct file is not a successful segment result.

A proposed evidence and indexing interface

ModuleInputOutput and invariant
AssetStoreSource asset, provenance, permissionStable asset_id and content digest
SegmenterDecoded timeline and policyHalf-open ranges and actual sampled PTS
EncoderAdapterPinned revision, preprocessing, segmentFinite vectors of the correct dimension
IndexWritersegment_id, permission domain, generationWrites only to the matching vector space
SearchCoordinatorQuery, authorization, model revisionAuthorized candidates that resolve to sources
EvidenceResolverAsset ID, interval, evidence requirementSource location, evidence status or unknown

This is a proposed XBSTACK design, not an official Clipstral product interface. For variable-frame-rate media, frame number multiplied by a constant interval is not a general timestamp mapping. Preserve presentation timestamps (PTS) and the time base, and convert using integers or rational arithmetic. For rotated, clipped, edited or replaced media, distinguish original and derived revisions so an older index entry cannot silently reference a different source.

7. Vector databases, hybrid retrieval and index migration

Multichannel recall and RRF rank fusion

Reciprocal Rank Fusion (RRF) can combine candidates by summing 1/(k+rank) across lists where an item appears. k is a tuning parameter, not a Clipstral training setting. Raw cosine-score distributions across models need not match, so direct weighted addition is unsafe without calibration. Begin with interpretable rank fusion, then evaluate calibrated scoring or reranking against labeled tasks.

Choose candidate channels by query intent. A visual event such as a red vehicle entering a garage may use vision embeddings; an equipment serial number calls for precise text; a spoken sentence requires time-aligned ASR. Use stable asset identifiers and time ranges to unify candidates across channels rather than adding incomparable raw scores.

The original Reciprocal Rank Fusion paper gives a rank-based fusion approach. If two lists are [a,c] and [b,c], with k=60, c receives 2/62 while a and b each receive 1/61, placing c first. Our V6 script actually checks that ordering and confirms that duplicate identifiers within one channel do not count twice. This demonstrates the mechanism, not guaranteed improvements for all multimodal queries. Channel coverage, depth, deduplication and query intent affect results.

ANN, exact search and permission-aware ranking

Begin with exact search as an auditable baseline before adopting approximate nearest-neighbor (ANN) indexing for scale and latency. Direct dot-product scanning over N vectors of dimension d requires work proportional to N×d. With one million 1,024-dimensional vectors, a full scan involves on the order of 1.024 billion multiply-accumulate operations plus reading the vectors. Parallelism, memory bandwidth, layout, caching and hardware determine measured performance; that arithmetic does not give a millisecond latency.

The original HNSW study describes a hierarchical navigable graph for approximate search. Graph construction, connectivity and search breadth affect recall, storage and build time. Evaluate ANN against exact-neighbor Recall@K, filtered-search recall, deletion behavior and actual disk size, not only query speed.

FP16 storage, scalar quantization, product quantization and weight quantization are distinct decisions. Even when the encoder is unchanged, reducing vector precision can reorder close neighbors. For compressed indexes, use uncompressed exact search as a reference, including close candidates, subtle visual differences and queries without a relevant answer.

Apply authorization before candidate output

Consider a disallowed asset scoring 0.99 and two authorized assets scoring 0.8 and 0.7. Retrieving global top one and filtering afterward yields an empty list. Ranking within the authorized set returns the valid 0.8 result. The V6 local script verifies this with artificial scores. It does not establish that any particular ANN engine provides reliable access filtering; it identifies an interaction between retrieval semantics and security semantics.

Where query-time filtering is not reliable, use separately authorized index partitions or a verified filter-aware search. Prevent disallowed thumbnails, original files, text and similarity information from reaching external results. Increasing candidate depth before filtering does not guarantee authorized recall when many high-ranking assets are inaccessible. Bind cache keys to a permission revision and invalidate older results when permissions change.

Vector storage and segment-index capacity

Raw payload budget for 1024-dimensional FP32 and FP16 embeddings

Decimal MB/GB arithmetic for raw vectors only; excludes ANN structures, metadata, originals, caches and runtime resources.

Raw vector payload is S=N×d×b for N items, dimension d and bytes per dimension b. For 1024-dimensional embeddings:

ItemsFP32 (4 bytes)FP16 (2 bytes)
10,00040.96 MB20.48 MB
100,000409.6 MB204.8 MB
1,000,0004.096 GB2.048 GB

These decimal estimates omit ANN graph structures, database pages, IDs, ACLs, logs, thumbnails, originals and backups.

A one-hour video with 30-second windows and 15-second stride has floor((3600−30)/15)+1=239 complete windows. For 1,000 such videos, one 1024-dimensional FP32 vector per window yields 978.944 MB of raw visual vector payload. Subtitle and text vectors are separate costs. Choose overlap and segment length against localization quality, not model file size. A complete-window count can leave a residual tail; retain a short segment for short assets, otherwise align a final window to the media end and deduplicate it.

Safe embedding-model migration

Re-encoding original assets into a shadow index, validating, switching generations and retaining rollback

Proposed XBSTACK index-generation design, not a production concurrency or model-migration benchmark.

Equal dimension does not imply compatible embedding spaces. Model revision, preprocessing, normalization and instructions can all affect the representation. Keep the current index_generation serving while building a shadow generation from original assets. Compare both generations on fixed relevance, latency, citation and permission tasks, then switch an active pointer atomically only after acceptance. Preserve rollback and generation-aware incremental imports/deletions.

Keep asset_id, segment_id and original timestamps stable across re-encoding; changing a model must not break saved references. Rebuildable embeddings do not make user originals disposable. Indexing jobs should be resumable and bounded by resource and thermal limits; failures must not leave ambiguous half-complete state.

Capacity arithmetic is a planning starting point, not a performance measurement. For one million 1,024-dimensional FP32 vectors, one generation has 4.096 GB of raw vector payload. Retaining old and new generations concurrently requires about 8.192 GB for those raw visual vectors alone, excluding media, other channels, graphs and transaction space. Verify capacity before migration; do not delete the serving index midway through a failed rebuild. Encode in resumable batches with traceable source revisions; stop safely when storage is insufficient.

8. On-device deployment, local knowledge bases and engineering

Model weights, Mac compatibility and quantization paths

At 1.24B parameters, theoretical weight-only BF16 and FP32 sizes are approximately 2.48 GB and 4.96 GB. The vendor describes CPU FP32 and NVIDIA BF16 tests; its macOS example selects CPU dependencies. This does not establish MPS, CoreML, mobile or arbitrary quantized compatibility. Decode buffers, activations, spatial-temporal attention, indexing and system memory matter; multi-frame peak memory can dominate single-image behavior. Figure 8 times batch-one encoding at 448 pixels on H200, BF16 and torch.compile, excluding preprocessing and tokenization. Device tests must separately measure decoding, sampling, preprocessing, encoding, search and reranking rather than treating accelerator encoding time as end-to-end query latency.

Mac deployment preflight and community conversion. On December 3, 2026 the local ARM64 Mac had 16 GiB RAM and around 32 GiB disk available. Its project Python 3.11.15 environment lacks torch, transformers, MLX and OpenCV. The upstream pyproject.toml retrieved through GitHub API at HEAD efb6abb3c548c395a31062c6f64a798ea57381aa requires Python >=3.13, torch >=2.11, torchvision >=0.26 and transformers >=4.57, choosing the CPU package index on non-Linux systems. The current environment is not the documented setup. Public HF metadata access timed out and no weights were downloaded.

A community MLX MXFP4 card lists 1,336,507,333 bytes of weights (about 1.337 GB), 4-bit MXFP4 with group size 32, and a pinned Neywa-Labs/mlx-vlm commit. The commit exists according to GitHub API. The converter reports text, image, video and normalized FP32 embeddings, not official runtime support, measured peak device memory or XBSTACK accuracy. Review code and weight revision, and compare ranking and temporal localization to original weights before migrating any production index.

A new metadata request succeeded and returned official revision bfdaf7bd6fd65a1c3c5cbb3cecf884ce153751ff. The Mac had 16 GiB unified memory and about 13.4 GB free disk. Neither this model nor the community conversion was present in the default cache. The existing Python 3.11.15 environment contains PyTorch 2.1.2 and Transformers 4.24.0, well below the repository’s stated Python ≥3.13, torch ≥2.11 and transformers ≥4.57 requirements. Available MPS does not establish model compatibility. No qualified new environment was installed, no weights were downloaded and no remote model code was executed. The earlier metadata timeout and the later HTTP 200 result are both retained; connectivity and runtime compatibility are different claims.

End-to-end resource measurement and device tiers

On-device bottlenecks can include decoding, preprocessing, model weights, temporal intermediates, index writes and other applications. Background ingestion throughput can interfere with foreground query latency. Measure cold loading, decoding, visual encoding, query encoding, ANN search, reranking, source resolution and index writing separately, with peak memory and actual disk use. GPU forward-pass time is not the full user-facing latency.

A local-first product should not hard-code one model for every device. Establish an actual runtime compatibility matrix for desktops, phones and tablets. Test images before adding short video and high-resolution stress cases. Devices that fail memory or energy budgets can retain lightweight text or specialized visual retrieval, with the video limitation made explicit. Community-quantized weights require validation of output-space compatibility, multimodal retrieval quality and licensing, not just successful loading.

Staged acceptance from encoding to source evidence

Design tests around the ability to isolate failures. Begin with fixed small images and short text to verify preprocessing and output contracts. Add cross-language paraphrases and short videos, then difficult media, permissions, background ingestion and index migration. On a frozen labeled dataset, measure exact-vector retrieval quality separately from ANN’s approximation of exact neighbors. Otherwise representation error and index approximation error become indistinguishable. For no-answer queries, measure rejection and false retrieval rather than forcing the most similar-looking item into the result.

A reproducible media index needs staged gates, not one recall number. First validate encoding contracts: accepted modalities, dimension, finiteness, normalization and fixed model/preprocessing revisions. Then evaluate exact search on a small authorized labeled corpus, separating text-to-image, text-to-video and reverse-direction tasks, retaining failures rather than successful screenshots alone. Next introduce ANN, vector compression and reranking; use exact-vector neighbors as the approximation reference and measure loss at each added component. Finally validate temporal ranges, source revisions, permission changes, deletions and generation switching.

Each layer has a different ground truth. Representation quality uses human relevance labels; ANN approximation uses exact neighbors in the same vector set; temporal localization uses source PTS or independent annotations; permissions use actual authorization policy. Correct video retrieval with a wrong interval is a file-level success and a localization failure. Correct exact search followed by ANN loss warrants index investigation rather than immediate model replacement. Unauthorized assets must never appear in visible outputs regardless of similarity. Correct attribution prevents using a model upgrade to conceal index or application defects.

On-device acceptance must capture actual disk use before and after ingestion, index generation, queue state, temporary files after cancellation and consistency after recovery. Do not generalize unverified resource measurements across devices. A constrained device can prioritize FTS and precise text search, then encode media when idle and within budgets. If visual indexing is incomplete, expose the coverage limitation rather than claiming an absent result proves the source does not exist. Build and evaluate an independent generation before model migration, preserving existing references and the serving index.

How can a personal knowledge base protect privacy and data security?

Local-first private photo and video search can reduce the need to send personal media to cloud services, provided encoding, indexing and querying actually take place in an authorized environment. Personal data security also requires access controls, scoped network access, consistent deletion of originals and derivatives, and review of model code and dependencies. Privacy protection is not an inherent guarantee of Clipstral. AI can reduce manual searching, while important citations and actions still require independent verification.

The official loading example uses trust_remote_code, allowing model-repository code to execute. Pin and review the revision and dependencies, verify file integrity, isolate the process and network permissions, and begin with licensed public or synthetic fixtures. Local inference and open weights do not make all file or network access safe. Embeddings, thumbnails, transcripts and caches can disclose sensitive source attributes; enforce source permissions and derivative deletion.

OwnRAG should retain available text retrieval and specialized document vision, and validate a media-segment channel separately. Device availability must be decided from actual runtime support, memory, thermal behavior and throughput; local-first does not mean loading the same model everywhere. Retrieved evidence can inform a personal assistant, but must never authorize browser or tool execution.

9. Research conclusions and directions for further validation

Clipstral’s dual encoders and temporal layer provide a research direction for personal photo and video-segment retrieval, but file-level recall, localization, evidence confirmation and answer generation still require separate acceptance. For OwnRAG, validate natural images, video segments and document vision independently. Adoption requires repeatable improvements on photos, short videos, cross-language queries including Chinese, fine-grained targets and no-answer tasks within resource and authorization budgets. Vendor averages cannot replace those criteria.

Our independent experiments cover sampling, timelines, ranking and limited persistence contracts, not weight inference or complete device acceptance. Subsequent evaluation must pin original and converted model revisions and compare image/video retrieval, temporal localization, resources and failure cases on the same labeled corpus, with privacy controls. Clipstral remains a research candidate, not an adopted product baseline. Do not publish unmeasured model quality or device speed; add actual results to this article at the same URL rather than creating duplicate pages.

Primary sources

No Clipstral inference was performed by XBSTACK. This is source-grounded engineering analysis, explicit arithmetic and a test design. Future empirical results must be labeled separately, preserving the actual first-publication date.

Next step: continue the Agent system

Full decision path →

Choose the next architecture, tool, memory, evaluation, security, or production decision instead of starting over.

Continue with state and memoryIBM Granite Embedding Vision R2: OwnRAG, On-Device Multimodal RAG and Personal AI AssistantsExplore Granite Embedding Vision R2 through OwnRAG development cases: visual PDF retrieval, on-device AI, private knowledge bases, security and personal assistants.Continue with state and memoryHow Should a Local-First AI Knowledge Base Sync Across Devices? Sources, Embeddings, Conflicts, and DeletionHow should a local-first AI knowledge base sync across devices? Learn when to rebuild FTS and embeddings, prevent stale replay with tombstones, and keep data controls explicit.Continue with state and memoryEmbeddingGemma 2 Local Retrieval Test: Mac 270M, PDF/DOCX, 256d vs 768dA reproducible, bounded Mac CPU LiteRT-LM pilot: convert 16 published bilingual technical articles into 8 PDFs and 8 DOCX files, extract 278 chunks and evaluate EmbeddingGemma 2 270M against SQLite FTS5 and RRF on 32 authored questions. Not a natural-document, iPhone, or production RAG benchmark.
Comments & evidence

DISCUSSION

Questions, verification and corrections

Sign in to comment. Every new comment is reviewed before publication; while pending, it is visible only to you and the administrator.

Sign-in required Reviewed before public
Loading the discussion…