Feature Extraction
Safetensors
Model2Vec
sentence-transformers
code
distiller
code-search
code-embeddings
distillation
static-embeddings
tokenlearn
Instructions to use sarthak1/codemalt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use sarthak1/codemalt with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("sarthak1/codemalt") - sentence-transformers
How to use sarthak1/codemalt with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("sarthak1/codemalt") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
File size: 10,664 Bytes
1bc7e54 7837959 1bc7e54 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | # CodeMap Configuration File
# -------------------------
# This file configures CodeMap's behavior. Uncomment and modify settings as needed.
# LLM Configuration - Controls which model is used for AI operations
llm:
# Format: "provider:model-name", e.g., "openai:gpt-4o", "anthropic:claude-3-opus"
model: "google-gla:gemini-2.0-flash-lite"
temperature: 0.5 # Lower for more deterministic outputs, higher for creativity
max_input_tokens: 1000000 # Maximum tokens in input
max_output_tokens: 10000 # Maximum tokens in responses
max_requests: 25 # Maximum number of requests
# Embedding Configuration - Controls vector embedding behavior
embedding:
# Recommended models: "minishlab/potion-base-8M3", Only Model2Vec static models are supported
model_name: "minishlab/potion-base-8M"
dimension: 256
# dimension_metric: "cosine" # Metric for dimension calculation (e.g., "cosine", "euclidean")
# max_retries: 3 # Maximum retries for embedding requests
# retry_delay: 5 # Delay in seconds between retries
# max_content_length: 5000 # Maximum characters per file chunk
# Qdrant (Vector DB) settings
# qdrant_batch_size: 100 # Batch size for Qdrant uploads
# url: "http://localhost:6333" # Qdrant server URL
# timeout: 30 # Qdrant client timeout in seconds
# prefer_grpc: true # Prefer gRPC for Qdrant communication
# Advanced chunking settings - controls how code is split
# chunking:
# max_hierarchy_depth: 2 # Maximum depth of code hierarchy to consider
# max_file_lines: 1000 # Maximum lines per file before splitting
# Clustering settings for embeddings
# clustering:
# method: "agglomerative" # Clustering method: "agglomerative", "dbscan"
# agglomerative: # Settings for Agglomerative Clustering
# metric: "precomputed" # Metric: "cosine", "euclidean", "manhattan", "l1", "l2", "precomputed"
# distance_threshold: 0.3 # Distance threshold for forming clusters
# linkage: "complete" # Linkage criterion: "ward", "complete", "average", "single"
# dbscan: # Settings for DBSCAN Clustering
# eps: 0.3 # The maximum distance between two samples for one to be considered as in the neighborhood of the other
# min_samples: 2 # The number of samples in a neighborhood for a point to be considered as a core point
# algorithm: "auto" # Algorithm to compute pointwise distances: "auto", "ball_tree", "kd_tree", "brute"
# metric: "precomputed" # Metric for distance computation: "cityblock", "cosine", "euclidean", "l1", "l2", "manhattan", "precomputed"
# RAG (Retrieval Augmented Generation) Configuration
rag:
max_context_length: 8000 # Maximum context length for the LLM
max_context_results: 100 # Maximum number of context results to return
similarity_threshold: 0.75 # Minimum similarity score (0-1) for relevance
# system_prompt: null # Optional system prompt to guide the RAG model (leave commented or set if needed)
include_file_content: true # Include file content in context
include_metadata: true # Include file metadata in context
# Sync Configuration - Controls which files are excluded from processing
sync:
exclude_patterns:
- "^node_modules/"
- "^\\.venv/"
- "^venv/"
- "^env/"
- "^__pycache__/"
- "^\\.mypy_cache/"
- "^\\.pytest_cache/"
- "^\\.ruff_cache/"
- "^dist/"
- "^build/"
- "^\\.git/"
- "^typings/"
- "^\\.pyc$"
- "^\\.pyo$"
- "^\\.so$"
- "^\\.dll$"
- "^\\.lib$"
- "^\\.a$"
- "^\\.o$"
- "^\\.class$"
- "^\\.jar$"
# Generation Configuration - Controls documentation generation
gen:
max_content_length: 5000 # Maximum content length per file for generation
use_gitignore: true # Use .gitignore patterns to exclude files
output_dir: "documentation" # Directory to store generated documentation
include_tree: true # Include directory tree in output
include_entity_graph: true # Include entity relationship graph
semantic_analysis: true # Enable semantic analysis
lod_level: "skeleton" # Level of detail: "signatures", "structure", "docs", "skeleton", "full"
# Mermaid diagram configuration for entity graphs
# mermaid_entities:
# - "module"
# - "class"
# - "function"
# - "method"
# - "constant"
# - "variable"
# - "import"
# mermaid_relationships:
# - "declares"
# - "imports"
# - "calls"
mermaid_show_legend: false
mermaid_remove_unconnected: true # Show isolated nodes
mermaid_styled: false # Style the mermaid diagram
# Processor Configuration - Controls code processing behavior
processor:
enabled: true # Enable the processor
max_workers: 4 # Maximum number of parallel workers
ignored_patterns: # Patterns to ignore during processing
- "**/.git/**"
- "**/__pycache__/**"
- "**/.venv/**"
- "**/node_modules/**"
- "**/*.pyc"
- "**/dist/**"
- "**/build/**"
default_lod_level: "signatures" # Default level of detail: "signatures", "structure", "docs", "full"
# File watcher configuration
# watcher:
# enabled: true # Enable file watching
# debounce_delay: 1.0 # Delay in seconds before processing changes
# Commit Command Configuration
commit:
strategy: "semantic" # Strategy for splitting diffs: "file", "hunk", "semantic"
bypass_hooks: false # Whether to bypass git hooks
use_lod_context: true # Use level of detail context
is_non_interactive: false # Run in non-interactive mode
# Diff splitter configuration
# diff_splitter:
# similarity_threshold: 0.6 # Similarity threshold for grouping related changes
# directory_similarity_threshold: 0.3 # Threshold for considering directories similar (e.g., for renames)
# file_move_similarity_threshold: 0.85 # Threshold for detecting file moves/renames based on content
# min_chunks_for_consolidation: 2 # Minimum number of small chunks to consider for consolidation
# max_chunks_before_consolidation: 20 # Maximum number of chunks before forcing consolidation
# max_file_size_for_llm: 50000 # Maximum file size (bytes) for LLM processing of individual files
# max_log_diff_size: 1000 # Maximum size (lines) of diff log to pass to LLM for context
# default_code_extensions: # File extensions considered as code for semantic splitting
# - "js"
# - "jsx"
# - "ts"
# - "tsx"
# - "py"
# - "java"
# - "c"
# - "cpp"
# - "h"
# - "hpp"
# - "cc"
# - "cs"
# - "go"
# - "rb"
# - "php"
# - "rs"
# - "swift"
# - "scala"
# - "kt"
# - "sh"
# - "pl"
# - "pm"
# Commit convention configuration (Conventional Commits)
convention:
types: # Allowed commit types
- "feat"
- "fix"
- "docs"
- "style"
- "refactor"
- "perf"
- "test"
- "build"
- "ci"
- "chore"
scopes: [] # Add project-specific scopes here, e.g., ["api", "ui", "db"]
max_length: 72 # Maximum length of commit message header
# Commit linting configuration (based on conventional-changelog-lint rules)
# lint:
# # Rules are defined as: {level: "ERROR"|"WARNING"|"DISABLED", rule: "always"|"never", value: <specific_value_if_any>}
# header_max_length:
# level: "ERROR"
# rule: "always"
# value: 100
# header_case: # e.g., 'lower-case', 'upper-case', 'camel-case', etc.
# level: "DISABLED"
# rule: "always"
# value: "lower-case"
# header_full_stop:
# level: "ERROR"
# rule: "never"
# value: "."
# type_enum: # Types must be from the 'convention.types' list
# level: "ERROR"
# rule: "always"
# type_case:
# level: "ERROR"
# rule: "always"
# value: "lower-case"
# type_empty:
# level: "ERROR"
# rule: "never"
# scope_case:
# level: "ERROR"
# rule: "always"
# value: "lower-case"
# scope_empty: # Set to "ERROR" if scopes are mandatory
# level: "DISABLED"
# rule: "never"
# scope_enum: # Scopes must be from the 'convention.scopes' list if enabled
# level: "DISABLED"
# rule: "always"
# # value: [] # Add allowed scopes here if rule is "always" and level is not DISABLED
# subject_case: # Forbids specific cases in the subject
# level: "ERROR"
# rule: "never"
# value: ["sentence-case", "start-case", "pascal-case", "upper-case"]
# subject_empty:
# level: "ERROR"
# rule: "never"
# subject_full_stop:
# level: "ERROR"
# rule: "never"
# value: "."
# subject_exclamation_mark:
# level: "DISABLED"
# rule: "never"
# body_leading_blank: # Body must start with a blank line after subject
# level: "WARNING"
# rule: "always"
# body_empty:
# level: "DISABLED"
# rule: "never"
# body_max_line_length:
# level: "ERROR"
# rule: "always"
# value: 100
# footer_leading_blank: # Footer must start with a blank line after body
# level: "WARNING"
# rule: "always"
# footer_empty:
# level: "DISABLED"
# rule: "never"
# footer_max_line_length:
# level: "ERROR"
# rule: "always"
# value: 100
# Pull Request Configuration
pr:
defaults:
base_branch: null # Default base branch (null = auto-detect, e.g., main, master, develop)
feature_prefix: "feature/" # Default feature branch prefix
strategy: "github-flow" # Git workflow: "github-flow", "gitflow", "trunk-based"
# Branch mapping for different PR types (primarily used in gitflow strategy)
# branch_mapping:
# feature:
# base: "develop"
# prefix: "feature/"
# release:
# base: "main"
# prefix: "release/"
# hotfix:
# base: "main"
# prefix: "hotfix/"
# bugfix:
# base: "develop"
# prefix: "bugfix/"
# PR generation configuration
generate:
title_strategy: "llm" # Strategy for generating PR titles: "commits" (from commit messages), "llm" (AI generated)
description_strategy: "llm" # Strategy for descriptions: "commits", "llm"
# description_template: | # Template for PR description when using 'llm' strategy. Placeholders: {changes}, {testing_instructions}, {screenshots}
# ## Changes
# {changes}
#
# ## Testing
# {testing_instructions}
#
# ## Screenshots
# {screenshots}
use_workflow_templates: true # Use workflow-specific templates if available (e.g., for GitHub PR templates)
# Ask Command Configuration
ask:
interactive_chat: false # Enable interactive chat mode for the 'ask' command
|