Download recicl/__init__.py from devtaji/recICL: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/devtaji/recICL/resolve/main/recicl/__init__.py
- Command line
-
hf download hf://devtaji/recICL/recicl/__init__.py
-
curl -L -o __init__.py https://huggingface.co/devtaji/recICL/resolve/main/recicl/__init__.py
1.06 kB
| # SPDX-FileCopyrightText: 2026 devtaji | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| # New file for recICL (not from SAP). | |
| """recICL: an in-context next-item recommender built on SAP's RecPFN architecture. | |
| import recicl as ir | |
| model = ir.load_model("path/to/recICL") # config.json + model.safetensors | |
| catalog = ir.ItemCatalog(item_embeddings, dim=model.input_dim) # [N, 1536] precomputed item embeddings | |
| context = ir.ContextRetriever(other_users_sequences, model.config).retrieve(history) | |
| items, scores = ir.recommend(model, catalog, history, context, k=10) | |
| """ | |
| from .architecture import EmbKNN, RecPFN | |
| from .config import Config | |
| from .context_selector import InvertedIndexMatcher | |
| from .inference import (ContextRetriever, ItemCatalog, baseline_scores, load_config, load_model, recommend, | |
| score_items) | |
| __version__ = "0.1.0" | |
| __all__ = ["load_model", "load_config", "ItemCatalog", "ContextRetriever", "score_items", "recommend", | |
| "baseline_scores", "RecPFN", "EmbKNN", "Config", "InvertedIndexMatcher"] | |