Sentence Similarity
sentence-transformers
TensorBoard
Safetensors
qwen3
feature-extraction
dense
Generated from Trainer
dataset_size:400
loss:CachedMultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use JacobLinCool/Qwen3-Embedding-4B-GIR-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use JacobLinCool/Qwen3-Embedding-4B-GIR-1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("JacobLinCool/Qwen3-Embedding-4B-GIR-1") sentences = [ "Wrapper for calling the clean method of services attribute\n\n :return: None", "def import_from_nhmmer_table(hmmout_path):\n \n \n \n \n res=HMMSearchResult()\n res.fields = [\n SequenceSearchResult.QUERY_ID_FIELD,\n SequenceSearchResult.HMM_NAME_FIELD,\n SequenceSearchResult.ALIGNMENT_LENGTH_FIELD,\n SequenceSearchResult.QUERY_FROM_FIELD,\n SequenceSearchResult.QUERY_TO_FIELD,\n SequenceSearchResult.HIT_FROM_FIELD,\n SequenceSearchResult.HIT_TO_FIELD,\n SequenceSearchResult.ALIGNMENT_BIT_SCORE,\n SequenceSearchResult.ALIGNMENT_DIRECTION,\n ]\n \n for row in [x.rstrip().split() for x in open(hmmout_path) if not x.startswith()]:\n alifrom = int(row[6])\n alito = int(row[7])\n aln_length = (alito-alifrom if alito-alifrom>0 else alifrom-alito)\n res.results.append([row[0],\n row[2],\n aln_length,\n int(row[4]),\n int(row[5]),\n alifrom,\n alito,\n row[13],\n alito > alifrom\n ])\n return res", "def clean(self):\n \n logger.debug(\"Cleaning configuration objects before configuration sending:\")\n types_creations = self.__class__.types_creations\n for o_type in types_creations:\n (_, _, inner_property, _, _) = types_creations[o_type]\n logger.debug(\" . for %s\", inner_property, )\n inner_object = getattr(self, inner_property)\n inner_object.clean()", "def index_modules(idx=None, path=None):\n \n suppress_output()\n modules = defaultdict(list)\n pkglist = pkgutil.walk_packages(onerror=lambda x: True)\n print(pkglist)\n if path:\n pkglist = pkgutil.walk_packages(path, onerror=lambda x: True)\n for modl, name, ispkg in pkglist:\n try:\n path = os.path.join(modl.path, name.split()[-1])\n except AttributeError:\n \n continue\n\n if os.path.isdir(path):\n path = os.path.join(path, )\n path += \n\n objs = []\n\n if os.path.exists(path):\n try:\n objs = read_objs_from_path(path)\n except:\n continue\n elif not re.search(MODULE_BLACKLIST, name):\n try:\n mod = __import__(name)\n objs = [k for k in dir(mod) if not k.startswith()]\n except:\n continue\n else:\n continue\n\n for obj in objs:\n if name not in modules[obj]:\n modules[obj].append(name)\n suppress_output(True)\n return merge_dicts(idx, dict(modules))" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Train Script Share
2
#1 opened 7 months ago
by
BeniaDev