Model save
Browse files- 1_Pooling/config.json +10 -0
- README.md +680 -0
- config_sentence_transformers.json +14 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 1024,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": false,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": true,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,680 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- dense
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
- dataset_size:400
|
| 9 |
+
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: Qwen/Qwen3-Embedding-0.6B
|
| 11 |
+
widget:
|
| 12 |
+
- source_sentence: "Wrapper for calling the clean method of services attribute\n\n\
|
| 13 |
+
\ :return: None"
|
| 14 |
+
sentences:
|
| 15 |
+
- "def import_from_nhmmer_table(hmmout_path):\n \n \n \n \
|
| 16 |
+
\ \n res=HMMSearchResult()\n res.fields = [\n \
|
| 17 |
+
\ SequenceSearchResult.QUERY_ID_FIELD,\n SequenceSearchResult.HMM_NAME_FIELD,\n\
|
| 18 |
+
\ SequenceSearchResult.ALIGNMENT_LENGTH_FIELD,\n \
|
| 19 |
+
\ SequenceSearchResult.QUERY_FROM_FIELD,\n \
|
| 20 |
+
\ SequenceSearchResult.QUERY_TO_FIELD,\n SequenceSearchResult.HIT_FROM_FIELD,\n\
|
| 21 |
+
\ SequenceSearchResult.HIT_TO_FIELD,\n \
|
| 22 |
+
\ SequenceSearchResult.ALIGNMENT_BIT_SCORE,\n SequenceSearchResult.ALIGNMENT_DIRECTION,\n\
|
| 23 |
+
\ ]\n \n for row in [x.rstrip().split() for\
|
| 24 |
+
\ x in open(hmmout_path) if not x.startswith()]:\n alifrom = int(row[6])\n\
|
| 25 |
+
\ alito = int(row[7])\n aln_length = (alito-alifrom\
|
| 26 |
+
\ if alito-alifrom>0 else alifrom-alito)\n res.results.append([row[0],\n\
|
| 27 |
+
\ row[2],\n aln_length,\n\
|
| 28 |
+
\ int(row[4]),\n \
|
| 29 |
+
\ int(row[5]),\n alifrom,\n \
|
| 30 |
+
\ alito,\n row[13],\n \
|
| 31 |
+
\ alito > alifrom\n ])\n \
|
| 32 |
+
\ return res"
|
| 33 |
+
- "def clean(self):\n \n logger.debug(\"Cleaning configuration objects\
|
| 34 |
+
\ before configuration sending:\")\n types_creations = self.__class__.types_creations\n\
|
| 35 |
+
\ for o_type in types_creations:\n (_, _, inner_property, _,\
|
| 36 |
+
\ _) = types_creations[o_type]\n logger.debug(\" . for %s\", inner_property,\
|
| 37 |
+
\ )\n inner_object = getattr(self, inner_property)\n inner_object.clean()"
|
| 38 |
+
- "def index_modules(idx=None, path=None):\n \n suppress_output()\n modules\
|
| 39 |
+
\ = defaultdict(list)\n pkglist = pkgutil.walk_packages(onerror=lambda x: True)\n\
|
| 40 |
+
\ print(pkglist)\n if path:\n pkglist = pkgutil.walk_packages(path,\
|
| 41 |
+
\ onerror=lambda x: True)\n for modl, name, ispkg in pkglist:\n try:\n\
|
| 42 |
+
\ path = os.path.join(modl.path, name.split()[-1])\n except\
|
| 43 |
+
\ AttributeError:\n \n continue\n\n if os.path.isdir(path):\n\
|
| 44 |
+
\ path = os.path.join(path, )\n path += \n\n objs = []\n\
|
| 45 |
+
\n if os.path.exists(path):\n try:\n objs = read_objs_from_path(path)\n\
|
| 46 |
+
\ except:\n continue\n elif not re.search(MODULE_BLACKLIST,\
|
| 47 |
+
\ name):\n try:\n mod = __import__(name)\n \
|
| 48 |
+
\ objs = [k for k in dir(mod) if not k.startswith()]\n except:\n\
|
| 49 |
+
\ continue\n else:\n continue\n\n for\
|
| 50 |
+
\ obj in objs:\n if name not in modules[obj]:\n modules[obj].append(name)\n\
|
| 51 |
+
\ suppress_output(True)\n return merge_dicts(idx, dict(modules))"
|
| 52 |
+
- source_sentence: Try to import the aeneas package and return ``True`` if that fails.
|
| 53 |
+
sentences:
|
| 54 |
+
- "def check_import():\n \n try:\n import aeneas\n print_success(u\"\
|
| 55 |
+
aeneas OK\")\n return False\n except ImportError:\n print_error(u\"\
|
| 56 |
+
aeneas ERROR\")\n print_info(u\" Unable to load the aeneas Python\
|
| 57 |
+
\ package\")\n print_info(u\" This error is probably caused by:\")\n \
|
| 58 |
+
\ print_info(u\" A. you did not download/git-clone the aeneas package\
|
| 59 |
+
\ properly; or\")\n print_info(u\" B. you did not install the required\
|
| 60 |
+
\ Python packages:\")\n print_info(u\" 1. BeautifulSoup4\")\n \
|
| 61 |
+
\ print_info(u\" 2. lxml\")\n print_info(u\" 3. numpy\")\n\
|
| 62 |
+
\ except Exception as e:\n print_error(e)\n return True"
|
| 63 |
+
- "def simplify(source, kink=20):\n \n source_coord = map(lambda o: {\"lng\"\
|
| 64 |
+
: o.coordinates[0], \"lat\": o.coordinates[1]}, source)\n\n \n \n \n\
|
| 65 |
+
\ F = (math.pi / 180.0) * 0.5\n index = [] \n sig_start = [] \n sig_end\
|
| 66 |
+
\ = []\n\n \n count = len(source_coord)\n if count < 3:\n return\
|
| 67 |
+
\ source_coord \n\n \n\n band_sqr = kink * 360.0 / (2.0 * math.pi * 6378137.0)\
|
| 68 |
+
\ \n band_sqr *= band_sqr\n n_dest = 0\n sig_start[0] = 0\n sig_end[0]\
|
| 69 |
+
\ = count - 1\n n_stack = 1\n\n \n while n_stack > 0:\n \n \
|
| 70 |
+
\ start = sig_start[n_stack - 1]\n end = sig_end[n_stack - 1]\n \
|
| 71 |
+
\ n_stack -= 1\n\n if (end - start) > 1: \n \n \
|
| 72 |
+
\ x12 = source[end][\"lng\"] - source[start][\"lng\"]\n y12 = source[end][\"\
|
| 73 |
+
lat\"] - source[start][\"lat\"]\n if math.fabs(x12) > 180.0:\n \
|
| 74 |
+
\ x12 = 360.0 - math.fabs(x12)\n x12 *= math.cos(F * (source[end][\"\
|
| 75 |
+
lat\"] + source[start][\"lat\"])) \n d12 = (x12 * x12) + (y12 * y12)\n\
|
| 76 |
+
\n i = start + 1\n sig = start\n max_dev_sqr\
|
| 77 |
+
\ = -1.0\n while i < end:\n x13 = source[i][\"lng\"\
|
| 78 |
+
] - source[start][\"lng\"]\n y13 = source[i][\"lat\"] - source[start][\"\
|
| 79 |
+
lat\"]\n if math.fabs(x13) > 180.0:\n x13 =\
|
| 80 |
+
\ 360.0 - math.fabs(x13)\n x13 *= math.cos(F * (source[i][\"lat\"\
|
| 81 |
+
] + source[start][\"lat\"]))\n d13 = (x13 * x13) + (y13 * y13)\n\
|
| 82 |
+
\ x23 = source[i][\"lng\"] - source[end][\"lng\"]\n \
|
| 83 |
+
\ y23 = source[i][\"lat\"] - source[end][\"lat\"]\n if math.fabs(x23)\
|
| 84 |
+
\ > 180.0:\n x23 = 360.0 - math.fabs(x23)\n \
|
| 85 |
+
\ x23 *= math.cos(F * (source[i][\"lat\"] + source[end][\"lat\"]))\n \
|
| 86 |
+
\ d23 = (x23 * x23) + (y23 * y23)\n\n if d13 >= (d12 + d23):\n\
|
| 87 |
+
\ dev_sqr = d23\n elif d23 >= (d12 + d13):\n\
|
| 88 |
+
\ dev_sqr = d13\n else:\n \
|
| 89 |
+
\ dev_sqr = (x13 * y12 - y13 * x12) * (x13 * y12 - y13 * x12) / d12 \n \
|
| 90 |
+
\ if dev_sqr > max_dev_sqr:\n sig = i\n \
|
| 91 |
+
\ max_dev_sqr = dev_sqr\n i += 1\n\n\n if max_dev_sqr\
|
| 92 |
+
\ < band_sqr: \n \n index[n_dest] = start\n \
|
| 93 |
+
\ n_dest += 1\n else: \n n_stack += 1\n \
|
| 94 |
+
\ sig_start[n_stack - 1] = sig\n sig_end[n_stack - 1]\
|
| 95 |
+
\ = end\n n_stack += 1\n sig_start[n_stack - 1]\
|
| 96 |
+
\ = start\n sig_end[n_stack - 1] = sig\n\n else: \n \
|
| 97 |
+
\ index[n_dest] = start\n n_dest += 1\n\n \n index[n_dest]\
|
| 98 |
+
\ = count - 1\n n_dest += 1\n\n \n r = []\n for i in range(0, n_dest):\n\
|
| 99 |
+
\ r.append(source_coord[index[i]])\n\n return map(lambda o: {\"type\"\
|
| 100 |
+
: \"Point\",\"coordinates\": [o.lng, o.lat]}, r)"
|
| 101 |
+
- "def smooth(data, fw):\r\n \r\n if fw == 0:\r\n fdata = data\r\n\
|
| 102 |
+
\ else:\r\n fdata = lfilter(np.ones(fw)/fw, 1, data)\r\n return fdata"
|
| 103 |
+
- source_sentence: Start response processing.
|
| 104 |
+
sentences:
|
| 105 |
+
- "async def start(self, connection: ) -> :\n \n self._closed = False\n\
|
| 106 |
+
\ self._protocol = connection.protocol\n self._connection = connection\n\
|
| 107 |
+
\n with self._timer:\n while True:\n \n \
|
| 108 |
+
\ try:\n message, payload = await self._protocol.read()\
|
| 109 |
+
\ \n except http.HttpProcessingError as exc:\n \
|
| 110 |
+
\ raise ClientResponseError(\n self.request_info, self.history,\n\
|
| 111 |
+
\ status=exc.code,\n message=exc.message,\
|
| 112 |
+
\ headers=exc.headers) from exc\n\n if (message.code < 100 or\n\
|
| 113 |
+
\ message.code > 199 or message.code == 101):\n \
|
| 114 |
+
\ break\n\n if self._continue is not None:\n \
|
| 115 |
+
\ set_result(self._continue, True)\n self._continue\
|
| 116 |
+
\ = None\n\n \n payload.on_eof(self._response_eof)\n\n \n\
|
| 117 |
+
\ self.version = message.version\n self.status = message.code\n\
|
| 118 |
+
\ self.reason = message.reason\n\n \n self._headers = message.headers\
|
| 119 |
+
\ \n self._raw_headers = message.raw_headers \n\n \n self.content\
|
| 120 |
+
\ = payload\n\n \n for hdr in self.headers.getall(hdrs.SET_COOKIE,\
|
| 121 |
+
\ ()):\n try:\n self.cookies.load(hdr)\n \
|
| 122 |
+
\ except CookieError as exc:\n client_logger.warning(\n \
|
| 123 |
+
\ , exc)\n return self"
|
| 124 |
+
- "def solve(self, verbose=False, allow_brute_force=True):\n \n while\
|
| 125 |
+
\ not self.is_solved:\n \n self._update()\n\n \
|
| 126 |
+
\ \n singles_found = False or self._fill_naked_singles() or self._fill_hidden_singles()\n\
|
| 127 |
+
\n \n \n \n if not singles_found:\n\
|
| 128 |
+
\ if allow_brute_force:\n solution = None\n\
|
| 129 |
+
\ try:\n dlxs = DancingLinksSolver(copy.deepcopy(self._matrix))\n\
|
| 130 |
+
\ solutions = dlxs.solve()\n solution\
|
| 131 |
+
\ = next(solutions)\n more_solutions = next(solutions)\n\
|
| 132 |
+
\ except StopIteration as e:\n if solution\
|
| 133 |
+
\ is not None:\n self._matrix = solution\n \
|
| 134 |
+
\ else:\n raise SudokuHasNoSolutionError(\"\
|
| 135 |
+
Dancing Links solver could not find any solution.\")\n except\
|
| 136 |
+
\ Exception as e:\n raise SudokuHasNoSolutionError(\"Brute\
|
| 137 |
+
\ Force method failed.\")\n else:\n \
|
| 138 |
+
\ \n \n raise SudokuHasMultipleSolutionsError(\"\
|
| 139 |
+
This Sudoku has multiple solutions!\")\n self.solution_steps.append(\"\
|
| 140 |
+
BRUTE FORCE - Dancing Links\")\n break\n else:\n\
|
| 141 |
+
\ print(self)\n raise SudokuTooDifficultError(\"\
|
| 142 |
+
This Sudoku requires more advanced methods!\")\n if verbose:\n \
|
| 143 |
+
\ print(\"Sudoku solved in {0} iterations!\\n{1}\".format(len(self.solution_steps),\
|
| 144 |
+
\ self))\n for step in self.solution_steps:\n print(step)"
|
| 145 |
+
- "def get_peer_ips(self):\n \n presponse = [ord(i) for i in self.tracker_response[]]\n\
|
| 146 |
+
\ while presponse:\n peer_ip = ((.join(str(x) for x in presponse[0:4]),\n\
|
| 147 |
+
\ 256 * presponse[4] + presponse[5]))\n if peer_ip\
|
| 148 |
+
\ not in self.peer_ips:\n self.peer_ips.append(peer_ip)\n \
|
| 149 |
+
\ presponse = presponse[6:]"
|
| 150 |
+
- source_sentence: "Setter method for ipv6_phy_intf_cmds, mapped from YANG variable\
|
| 151 |
+
\ /interface/fortygigabitethernet/ipv6/ipv6_phy_intf_cmds (container)\n If\
|
| 152 |
+
\ this variable is read-only (config: false) in the\n source YANG file, then\
|
| 153 |
+
\ _set_ipv6_phy_intf_cmds is considered as a private\n method. Backends looking\
|
| 154 |
+
\ to populate this variable should\n do so via calling thisObj._set_ipv6_phy_intf_cmds()\
|
| 155 |
+
\ directly."
|
| 156 |
+
sentences:
|
| 157 |
+
- "def _trim_xpath(self, xpath, prop):\n \n\n xroot = self._get_xroot_for(prop)\n\
|
| 158 |
+
\n if xroot is None and isinstance(xpath, string_types):\n xtags\
|
| 159 |
+
\ = xpath.split(XPATH_DELIM)\n\n if xtags[-1] in _iso_tag_primitives:\n\
|
| 160 |
+
\ xroot = XPATH_DELIM.join(xtags[:-1])\n\n return xroot"
|
| 161 |
+
- "def _set_ipv6_phy_intf_cmds(self, v, load=False):\n \n if hasattr(v, \"\
|
| 162 |
+
_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=ipv6_phy_intf_cmds.ipv6_phy_intf_cmds,\
|
| 163 |
+
\ is_container=, presence=False, yang_name=\"ipv6-phy-intf-cmds\", rest_name=\"\
|
| 164 |
+
\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True,\
|
| 165 |
+
\ extensions={u: {u: u, u: None, u: u}}, namespace=, defining_module=, yang_type=,\
|
| 166 |
+
\ is_config=True)\n except (TypeError, ValueError):\n raise ValueError({\n\
|
| 167 |
+
\ : ,\n : \"container\",\n : ,\n })\n\n self.__ipv6_phy_intf_cmds\
|
| 168 |
+
\ = t\n if hasattr(self, ):\n self._set()"
|
| 169 |
+
- "def create_snapshot(self, xml_bytes):\n \n root = XML(xml_bytes)\n\
|
| 170 |
+
\ snapshot_id = root.findtext(\"snapshotId\")\n volume_id = root.findtext(\"\
|
| 171 |
+
volumeId\")\n status = root.findtext(\"status\")\n start_time =\
|
| 172 |
+
\ root.findtext(\"startTime\")\n start_time = datetime.strptime(\n \
|
| 173 |
+
\ start_time[:19], \"%Y-%m-%dT%H:%M:%S\")\n progress = root.findtext(\"\
|
| 174 |
+
progress\")[:-1]\n progress = float(progress or \"0\") / 100.\n \
|
| 175 |
+
\ return model.Snapshot(\n snapshot_id, volume_id, status, start_time,\
|
| 176 |
+
\ progress)"
|
| 177 |
+
- source_sentence: "Generates samples of text from the provided vocabulary.\n\n Args:\n\
|
| 178 |
+
\ plain_vocab: vocabulary.\n distribution: distribution.\n train_samples:\
|
| 179 |
+
\ samples for training.\n length: length.\n\n Returns:\n train_indices\
|
| 180 |
+
\ (np.array of Integers): random integers for training.\n shape = [num_samples,\
|
| 181 |
+
\ length]\n test_indices (np.array of Integers): random integers for testing.\n\
|
| 182 |
+
\ shape = [num_samples, length]\n plain_vocab (list of Integers): unique\
|
| 183 |
+
\ vocabularies."
|
| 184 |
+
sentences:
|
| 185 |
+
- "def late_filling(target, pressure=,\n Pc_star=,\n \
|
| 186 |
+
\ Swp_star=0.2, eta=3):\n r\n element = pressure.split()[0]\n network\
|
| 187 |
+
\ = target.project.network\n phase = target.project.find_phase(target)\n \
|
| 188 |
+
\ pc_star = phase[Pc_star]\n Pc = phase[pressure]\n \n Ts = network.map_throats(throats=target.Ts,\
|
| 189 |
+
\ origin=target)\n values = values[Ts]\n else:\n Ps = network.map_pores(pores=target.Ps,\
|
| 190 |
+
\ origin=target)\n values = values[Ps]\n return values"
|
| 191 |
+
- "def switch(self, name):\n \n try:\n switch = self.storage[self.__namespaced(name)]\n\
|
| 192 |
+
\ except KeyError:\n if not self.autocreate:\n \
|
| 193 |
+
\ raise ValueError(\"No switch named registered in \" % (name, self.namespace))\n\
|
| 194 |
+
\n switch = self.__create_and_register_disabled_switch(name)\n\n \
|
| 195 |
+
\ switch.manager = self\n return switch"
|
| 196 |
+
- "def generate_plaintext_random(plain_vocab, distribution, train_samples,\n \
|
| 197 |
+
\ length):\n \n if distribution is not None:\n \
|
| 198 |
+
\ assert len(distribution) == len(plain_vocab)\n\n train_indices = np.random.choice(\n\
|
| 199 |
+
\ range(len(plain_vocab)), (train_samples, length), p=distribution)\n\n \
|
| 200 |
+
\ return train_indices"
|
| 201 |
+
pipeline_tag: sentence-similarity
|
| 202 |
+
library_name: sentence-transformers
|
| 203 |
+
metrics:
|
| 204 |
+
- cosine_accuracy@1
|
| 205 |
+
- cosine_accuracy@5
|
| 206 |
+
- cosine_accuracy@10
|
| 207 |
+
- cosine_precision@1
|
| 208 |
+
- cosine_precision@3
|
| 209 |
+
- cosine_precision@5
|
| 210 |
+
- cosine_precision@10
|
| 211 |
+
- cosine_recall@1
|
| 212 |
+
- cosine_recall@3
|
| 213 |
+
- cosine_recall@5
|
| 214 |
+
- cosine_recall@10
|
| 215 |
+
- cosine_ndcg@1
|
| 216 |
+
- cosine_ndcg@5
|
| 217 |
+
- cosine_ndcg@10
|
| 218 |
+
- cosine_mrr@1
|
| 219 |
+
- cosine_mrr@5
|
| 220 |
+
- cosine_mrr@10
|
| 221 |
+
- cosine_map@100
|
| 222 |
+
model-index:
|
| 223 |
+
- name: SentenceTransformer based on Qwen/Qwen3-Embedding-0.6B
|
| 224 |
+
results:
|
| 225 |
+
- task:
|
| 226 |
+
type: information-retrieval
|
| 227 |
+
name: Information Retrieval
|
| 228 |
+
dataset:
|
| 229 |
+
name: Unknown
|
| 230 |
+
type: unknown
|
| 231 |
+
metrics:
|
| 232 |
+
- type: cosine_accuracy@1
|
| 233 |
+
value: 0.96
|
| 234 |
+
name: Cosine Accuracy@1
|
| 235 |
+
- type: cosine_accuracy@5
|
| 236 |
+
value: 1.0
|
| 237 |
+
name: Cosine Accuracy@5
|
| 238 |
+
- type: cosine_accuracy@10
|
| 239 |
+
value: 1.0
|
| 240 |
+
name: Cosine Accuracy@10
|
| 241 |
+
- type: cosine_precision@1
|
| 242 |
+
value: 0.96
|
| 243 |
+
name: Cosine Precision@1
|
| 244 |
+
- type: cosine_precision@3
|
| 245 |
+
value: 0.33000000000000007
|
| 246 |
+
name: Cosine Precision@3
|
| 247 |
+
- type: cosine_precision@5
|
| 248 |
+
value: 0.19999999999999996
|
| 249 |
+
name: Cosine Precision@5
|
| 250 |
+
- type: cosine_precision@10
|
| 251 |
+
value: 0.09999999999999998
|
| 252 |
+
name: Cosine Precision@10
|
| 253 |
+
- type: cosine_recall@1
|
| 254 |
+
value: 0.96
|
| 255 |
+
name: Cosine Recall@1
|
| 256 |
+
- type: cosine_recall@3
|
| 257 |
+
value: 0.99
|
| 258 |
+
name: Cosine Recall@3
|
| 259 |
+
- type: cosine_recall@5
|
| 260 |
+
value: 1.0
|
| 261 |
+
name: Cosine Recall@5
|
| 262 |
+
- type: cosine_recall@10
|
| 263 |
+
value: 1.0
|
| 264 |
+
name: Cosine Recall@10
|
| 265 |
+
- type: cosine_ndcg@1
|
| 266 |
+
value: 0.96
|
| 267 |
+
name: Cosine Ndcg@1
|
| 268 |
+
- type: cosine_ndcg@5
|
| 269 |
+
value: 0.9832346581878777
|
| 270 |
+
name: Cosine Ndcg@5
|
| 271 |
+
- type: cosine_ndcg@10
|
| 272 |
+
value: 0.9832346581878777
|
| 273 |
+
name: Cosine Ndcg@10
|
| 274 |
+
- type: cosine_mrr@1
|
| 275 |
+
value: 0.96
|
| 276 |
+
name: Cosine Mrr@1
|
| 277 |
+
- type: cosine_mrr@5
|
| 278 |
+
value: 0.9775
|
| 279 |
+
name: Cosine Mrr@5
|
| 280 |
+
- type: cosine_mrr@10
|
| 281 |
+
value: 0.9775
|
| 282 |
+
name: Cosine Mrr@10
|
| 283 |
+
- type: cosine_map@100
|
| 284 |
+
value: 0.9775
|
| 285 |
+
name: Cosine Map@100
|
| 286 |
+
---
|
| 287 |
+
|
| 288 |
+
# SentenceTransformer based on Qwen/Qwen3-Embedding-0.6B
|
| 289 |
+
|
| 290 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 291 |
+
|
| 292 |
+
## Model Details
|
| 293 |
+
|
| 294 |
+
### Model Description
|
| 295 |
+
- **Model Type:** Sentence Transformer
|
| 296 |
+
- **Base model:** [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) <!-- at revision c54f2e6e80b2d7b7de06f51cec4959f6b3e03418 -->
|
| 297 |
+
- **Maximum Sequence Length:** 32768 tokens
|
| 298 |
+
- **Output Dimensionality:** 1024 dimensions
|
| 299 |
+
- **Similarity Function:** Cosine Similarity
|
| 300 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 301 |
+
<!-- - **Language:** Unknown -->
|
| 302 |
+
<!-- - **License:** Unknown -->
|
| 303 |
+
|
| 304 |
+
### Model Sources
|
| 305 |
+
|
| 306 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 307 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 308 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 309 |
+
|
| 310 |
+
### Full Model Architecture
|
| 311 |
+
|
| 312 |
+
```
|
| 313 |
+
SentenceTransformer(
|
| 314 |
+
(0): Transformer({'max_seq_length': 32768, 'do_lower_case': False, 'architecture': 'Qwen3Model'})
|
| 315 |
+
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': True, 'include_prompt': True})
|
| 316 |
+
(2): Normalize()
|
| 317 |
+
)
|
| 318 |
+
```
|
| 319 |
+
|
| 320 |
+
## Usage
|
| 321 |
+
|
| 322 |
+
### Direct Usage (Sentence Transformers)
|
| 323 |
+
|
| 324 |
+
First install the Sentence Transformers library:
|
| 325 |
+
|
| 326 |
+
```bash
|
| 327 |
+
pip install -U sentence-transformers
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
Then you can load this model and run inference.
|
| 331 |
+
```python
|
| 332 |
+
from sentence_transformers import SentenceTransformer
|
| 333 |
+
|
| 334 |
+
# Download from the 🤗 Hub
|
| 335 |
+
model = SentenceTransformer("JacobLinCool/Qwen3-Embedding-0.6B-GIR-1")
|
| 336 |
+
# Run inference
|
| 337 |
+
queries = [
|
| 338 |
+
"Generates samples of text from the provided vocabulary.\n\n Args:\n plain_vocab: vocabulary.\n distribution: distribution.\n train_samples: samples for training.\n length: length.\n\n Returns:\n train_indices (np.array of Integers): random integers for training.\n shape = [num_samples, length]\n test_indices (np.array of Integers): random integers for testing.\n shape = [num_samples, length]\n plain_vocab (list of Integers): unique vocabularies.",
|
| 339 |
+
]
|
| 340 |
+
documents = [
|
| 341 |
+
'def generate_plaintext_random(plain_vocab, distribution, train_samples,\n length):\n \n if distribution is not None:\n assert len(distribution) == len(plain_vocab)\n\n train_indices = np.random.choice(\n range(len(plain_vocab)), (train_samples, length), p=distribution)\n\n return train_indices',
|
| 342 |
+
'def switch(self, name):\n \n try:\n switch = self.storage[self.__namespaced(name)]\n except KeyError:\n if not self.autocreate:\n raise ValueError("No switch named registered in " % (name, self.namespace))\n\n switch = self.__create_and_register_disabled_switch(name)\n\n switch.manager = self\n return switch',
|
| 343 |
+
'def late_filling(target, pressure=,\n Pc_star=,\n Swp_star=0.2, eta=3):\n r\n element = pressure.split()[0]\n network = target.project.network\n phase = target.project.find_phase(target)\n pc_star = phase[Pc_star]\n Pc = phase[pressure]\n \n Ts = network.map_throats(throats=target.Ts, origin=target)\n values = values[Ts]\n else:\n Ps = network.map_pores(pores=target.Ps, origin=target)\n values = values[Ps]\n return values',
|
| 344 |
+
]
|
| 345 |
+
query_embeddings = model.encode_query(queries)
|
| 346 |
+
document_embeddings = model.encode_document(documents)
|
| 347 |
+
print(query_embeddings.shape, document_embeddings.shape)
|
| 348 |
+
# [1, 1024] [3, 1024]
|
| 349 |
+
|
| 350 |
+
# Get the similarity scores for the embeddings
|
| 351 |
+
similarities = model.similarity(query_embeddings, document_embeddings)
|
| 352 |
+
print(similarities)
|
| 353 |
+
# tensor([[ 0.8822, -0.1093, 0.1044]])
|
| 354 |
+
```
|
| 355 |
+
|
| 356 |
+
<!--
|
| 357 |
+
### Direct Usage (Transformers)
|
| 358 |
+
|
| 359 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 360 |
+
|
| 361 |
+
</details>
|
| 362 |
+
-->
|
| 363 |
+
|
| 364 |
+
<!--
|
| 365 |
+
### Downstream Usage (Sentence Transformers)
|
| 366 |
+
|
| 367 |
+
You can finetune this model on your own dataset.
|
| 368 |
+
|
| 369 |
+
<details><summary>Click to expand</summary>
|
| 370 |
+
|
| 371 |
+
</details>
|
| 372 |
+
-->
|
| 373 |
+
|
| 374 |
+
<!--
|
| 375 |
+
### Out-of-Scope Use
|
| 376 |
+
|
| 377 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 378 |
+
-->
|
| 379 |
+
|
| 380 |
+
## Evaluation
|
| 381 |
+
|
| 382 |
+
### Metrics
|
| 383 |
+
|
| 384 |
+
#### Information Retrieval
|
| 385 |
+
|
| 386 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
| 387 |
+
|
| 388 |
+
| Metric | Value |
|
| 389 |
+
|:--------------------|:-----------|
|
| 390 |
+
| cosine_accuracy@1 | 0.96 |
|
| 391 |
+
| cosine_accuracy@5 | 1.0 |
|
| 392 |
+
| cosine_accuracy@10 | 1.0 |
|
| 393 |
+
| cosine_precision@1 | 0.96 |
|
| 394 |
+
| cosine_precision@3 | 0.33 |
|
| 395 |
+
| cosine_precision@5 | 0.2 |
|
| 396 |
+
| cosine_precision@10 | 0.1 |
|
| 397 |
+
| cosine_recall@1 | 0.96 |
|
| 398 |
+
| cosine_recall@3 | 0.99 |
|
| 399 |
+
| cosine_recall@5 | 1.0 |
|
| 400 |
+
| cosine_recall@10 | 1.0 |
|
| 401 |
+
| cosine_ndcg@1 | 0.96 |
|
| 402 |
+
| cosine_ndcg@5 | 0.9832 |
|
| 403 |
+
| **cosine_ndcg@10** | **0.9832** |
|
| 404 |
+
| cosine_mrr@1 | 0.96 |
|
| 405 |
+
| cosine_mrr@5 | 0.9775 |
|
| 406 |
+
| cosine_mrr@10 | 0.9775 |
|
| 407 |
+
| cosine_map@100 | 0.9775 |
|
| 408 |
+
|
| 409 |
+
<!--
|
| 410 |
+
## Bias, Risks and Limitations
|
| 411 |
+
|
| 412 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 413 |
+
-->
|
| 414 |
+
|
| 415 |
+
<!--
|
| 416 |
+
### Recommendations
|
| 417 |
+
|
| 418 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 419 |
+
-->
|
| 420 |
+
|
| 421 |
+
## Training Details
|
| 422 |
+
|
| 423 |
+
### Training Dataset
|
| 424 |
+
|
| 425 |
+
#### Unnamed Dataset
|
| 426 |
+
|
| 427 |
+
* Size: 400 training samples
|
| 428 |
+
* Columns: <code>query</code> and <code>code</code>
|
| 429 |
+
* Approximate statistics based on the first 400 samples:
|
| 430 |
+
| | query | code |
|
| 431 |
+
|:--------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|
|
| 432 |
+
| type | string | string |
|
| 433 |
+
| details | <ul><li>min: 2 tokens</li><li>mean: 67.12 tokens</li><li>max: 3156 tokens</li></ul> | <ul><li>min: 24 tokens</li><li>mean: 126.98 tokens</li><li>max: 1236 tokens</li></ul> |
|
| 434 |
+
* Samples:
|
| 435 |
+
| query | code |
|
| 436 |
+
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 437 |
+
| <code>For memory actions, get a list of addresses it operates on.<br><br> :param SimAction action: The action object to work with.<br> :return: A list of addresses that are accessed with that action.<br> :rtype: list</code> | <code>def _get_actual_addrs(action, state):<br> <br><br> if action.actual_addrs is None:<br> <br> addr_list = {0x60000000} <br> else:<br> addr_list = set(action.actual_addrs)<br><br> return addr_list</code> |
|
| 438 |
+
| <code>Construct the input file of the calculation.</code> | <code>def make_input(self, with_header=False):<br> <br> s = str(self.input)<br> if with_header: s = str(self) + "\n" + s<br> return s</code> |
|
| 439 |
+
| <code>Check worker status route</code> | <code>def check_worker_status():<br> <br> if not in request.args:<br> resp = {"status": "bad request"}<br> return jsonify(**resp)<br> else:<br> worker_id = request.args[]<br> assignment_id = request.args[]<br> allow_repeats = CONFIG.getboolean(, )<br> if allow_repeats: <br> try:<br> part = Participant.query.\<br> filter(Participant.workerid == worker_id).\<br> filter(Participant.assignmentid == assignment_id).one()<br> status = part.status<br> except exc.SQLAlchemyError:<br> status = NOT_ACCEPTED<br> else: <br> try:<br> matches = Participant.query.\<br> filter(Participant.workerid == worker_id).all()<br> numrecs = len(matches)<br> if numrecs==0: <br> status = NOT_ACCEPTED<br> else:<br> status = max([record.status for record in matches])<br> except exc.SQLAlchemyError:<br> ...</code> |
|
| 440 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 441 |
+
```json
|
| 442 |
+
{
|
| 443 |
+
"scale": 20.0,
|
| 444 |
+
"similarity_fct": "cos_sim",
|
| 445 |
+
"gather_across_devices": false
|
| 446 |
+
}
|
| 447 |
+
```
|
| 448 |
+
|
| 449 |
+
### Evaluation Dataset
|
| 450 |
+
|
| 451 |
+
#### Unnamed Dataset
|
| 452 |
+
|
| 453 |
+
* Size: 100 evaluation samples
|
| 454 |
+
* Columns: <code>query</code> and <code>code</code>
|
| 455 |
+
* Approximate statistics based on the first 100 samples:
|
| 456 |
+
| | query | code |
|
| 457 |
+
|:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
| 458 |
+
| type | string | string |
|
| 459 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 66.56 tokens</li><li>max: 548 tokens</li></ul> | <ul><li>min: 24 tokens</li><li>mean: 142.11 tokens</li><li>max: 901 tokens</li></ul> |
|
| 460 |
+
* Samples:
|
| 461 |
+
| query | code |
|
| 462 |
+
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 463 |
+
| <code>Return the value of the android prefixed attribute in a specific tag.<br><br> This function will always try to get the attribute with a android: prefix first,<br> and will try to return the attribute without the prefix, if the attribute could not be found.<br> This is useful for some broken AndroidManifest.xml, where no android namespace is set,<br> but could also indicate malicious activity (i.e. wrongly repackaged files).<br> A warning is printed if the attribute is found without a namespace prefix.<br><br> If you require to get the exact result you need to query the tag directly:<br><br> example::<br> >>> from lxml.etree import Element<br> >>> tag = Element('bar', nsmap={'android': 'http://schemas.android.com/apk/res/android'})<br> >>> tag.set('{http://schemas.android.com/apk/res/android}foobar', 'barfoo')<br> >>> tag.set('name', 'baz')<br> # Assume that `a` is some APK object<br> >>> a.get_value_from_tag(tag, 'name'...</code> | <code>def get_value_from_tag(self, tag, attribute):<br> <br><br> <br> <br> value = tag.get(self._ns(attribute))<br> if value is None:<br> value = tag.get(attribute)<br><br> if value:<br> <br> log.warning("Failed to get the attribute on tag with namespace. "<br> "But found the same attribute without namespace!".format(attribute, tag.tag))<br> return value</code> |
|
| 464 |
+
| <code>Get information about this object as a dictionary. Used by WebSocket interface to pass some<br> relevant information to client applications.</code> | <code>def get_as_datadict(self):<br> <br> return dict(type=self.__class__.__name__, tags=list(self.tags))</code> |
|
| 465 |
+
| <code>Makes forecast with the estimated model<br><br> Parameters<br> ----------<br> h : int (default : 5)<br> How many steps ahead would you like to forecast?<br><br> past_values : int (default : 20)<br> How many past observations to show on the forecast graph?<br><br> intervals : Boolean<br> Would you like to show 95% prediction intervals for the forecast?<br><br> Returns<br> ----------<br> - Plot of the forecast</code> | <code>def plot_predict(self,h=5,past_values=20,intervals=True,**kwargs): <br> <br> import matplotlib.pyplot as plt<br> import seaborn as sns<br><br> figsize = kwargs.get(,(10,7))<br><br> if self.latent_variables.estimated is False:<br> raise Exception("No latent variables estimated!")<br> else:<br> <br> scale, shape, skewness = self._get_scale_and_shape(self.latent_variables.get_z_values(transformed=True))<br> previous_value = self.data[-1] <br> forecasted_values = np.ones(h)*self.states[-1] <br> date_index = self.shift_dates(h)<br> simulations = 10000<br> sim_vector = np.zeros([simulations,h])<br> t_params = self.transform_z()<br><br> for n in range(0,simulations): <br> rnd_q = np.random.normal(0,np.sqrt(self.latent_variables.get_z_values(transformed=True)[0]),h) <br> exp = forecasted_values.copy()<br><br> for t in range(0,h):<br> if t == 0:...</code> |
|
| 466 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 467 |
+
```json
|
| 468 |
+
{
|
| 469 |
+
"scale": 20.0,
|
| 470 |
+
"similarity_fct": "cos_sim",
|
| 471 |
+
"gather_across_devices": false
|
| 472 |
+
}
|
| 473 |
+
```
|
| 474 |
+
|
| 475 |
+
### Training Hyperparameters
|
| 476 |
+
#### Non-Default Hyperparameters
|
| 477 |
+
|
| 478 |
+
- `eval_strategy`: epoch
|
| 479 |
+
- `per_device_train_batch_size`: 4
|
| 480 |
+
- `per_device_eval_batch_size`: 4
|
| 481 |
+
- `gradient_accumulation_steps`: 4
|
| 482 |
+
- `num_train_epochs`: 1
|
| 483 |
+
- `warmup_ratio`: 0.1
|
| 484 |
+
- `seed`: 2025
|
| 485 |
+
- `bf16`: True
|
| 486 |
+
- `load_best_model_at_end`: True
|
| 487 |
+
- `optim`: adamw_torch
|
| 488 |
+
- `push_to_hub`: True
|
| 489 |
+
- `hub_model_id`: JacobLinCool/Qwen3-Embedding-0.6B-GIR-1
|
| 490 |
+
- `hub_private_repo`: False
|
| 491 |
+
- `eval_on_start`: True
|
| 492 |
+
- `batch_sampler`: no_duplicates
|
| 493 |
+
|
| 494 |
+
#### All Hyperparameters
|
| 495 |
+
<details><summary>Click to expand</summary>
|
| 496 |
+
|
| 497 |
+
- `overwrite_output_dir`: False
|
| 498 |
+
- `do_predict`: False
|
| 499 |
+
- `eval_strategy`: epoch
|
| 500 |
+
- `prediction_loss_only`: True
|
| 501 |
+
- `per_device_train_batch_size`: 4
|
| 502 |
+
- `per_device_eval_batch_size`: 4
|
| 503 |
+
- `per_gpu_train_batch_size`: None
|
| 504 |
+
- `per_gpu_eval_batch_size`: None
|
| 505 |
+
- `gradient_accumulation_steps`: 4
|
| 506 |
+
- `eval_accumulation_steps`: None
|
| 507 |
+
- `torch_empty_cache_steps`: None
|
| 508 |
+
- `learning_rate`: 5e-05
|
| 509 |
+
- `weight_decay`: 0.0
|
| 510 |
+
- `adam_beta1`: 0.9
|
| 511 |
+
- `adam_beta2`: 0.999
|
| 512 |
+
- `adam_epsilon`: 1e-08
|
| 513 |
+
- `max_grad_norm`: 1.0
|
| 514 |
+
- `num_train_epochs`: 1
|
| 515 |
+
- `max_steps`: -1
|
| 516 |
+
- `lr_scheduler_type`: linear
|
| 517 |
+
- `lr_scheduler_kwargs`: {}
|
| 518 |
+
- `warmup_ratio`: 0.1
|
| 519 |
+
- `warmup_steps`: 0
|
| 520 |
+
- `log_level`: passive
|
| 521 |
+
- `log_level_replica`: warning
|
| 522 |
+
- `log_on_each_node`: True
|
| 523 |
+
- `logging_nan_inf_filter`: True
|
| 524 |
+
- `save_safetensors`: True
|
| 525 |
+
- `save_on_each_node`: False
|
| 526 |
+
- `save_only_model`: False
|
| 527 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 528 |
+
- `no_cuda`: False
|
| 529 |
+
- `use_cpu`: False
|
| 530 |
+
- `use_mps_device`: False
|
| 531 |
+
- `seed`: 2025
|
| 532 |
+
- `data_seed`: None
|
| 533 |
+
- `jit_mode_eval`: False
|
| 534 |
+
- `use_ipex`: False
|
| 535 |
+
- `bf16`: True
|
| 536 |
+
- `fp16`: False
|
| 537 |
+
- `fp16_opt_level`: O1
|
| 538 |
+
- `half_precision_backend`: auto
|
| 539 |
+
- `bf16_full_eval`: False
|
| 540 |
+
- `fp16_full_eval`: False
|
| 541 |
+
- `tf32`: None
|
| 542 |
+
- `local_rank`: 0
|
| 543 |
+
- `ddp_backend`: None
|
| 544 |
+
- `tpu_num_cores`: None
|
| 545 |
+
- `tpu_metrics_debug`: False
|
| 546 |
+
- `debug`: []
|
| 547 |
+
- `dataloader_drop_last`: False
|
| 548 |
+
- `dataloader_num_workers`: 0
|
| 549 |
+
- `dataloader_prefetch_factor`: None
|
| 550 |
+
- `past_index`: -1
|
| 551 |
+
- `disable_tqdm`: False
|
| 552 |
+
- `remove_unused_columns`: True
|
| 553 |
+
- `label_names`: None
|
| 554 |
+
- `load_best_model_at_end`: True
|
| 555 |
+
- `ignore_data_skip`: False
|
| 556 |
+
- `fsdp`: []
|
| 557 |
+
- `fsdp_min_num_params`: 0
|
| 558 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 559 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 560 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 561 |
+
- `parallelism_config`: None
|
| 562 |
+
- `deepspeed`: None
|
| 563 |
+
- `label_smoothing_factor`: 0.0
|
| 564 |
+
- `optim`: adamw_torch
|
| 565 |
+
- `optim_args`: None
|
| 566 |
+
- `adafactor`: False
|
| 567 |
+
- `group_by_length`: False
|
| 568 |
+
- `length_column_name`: length
|
| 569 |
+
- `ddp_find_unused_parameters`: None
|
| 570 |
+
- `ddp_bucket_cap_mb`: None
|
| 571 |
+
- `ddp_broadcast_buffers`: False
|
| 572 |
+
- `dataloader_pin_memory`: True
|
| 573 |
+
- `dataloader_persistent_workers`: False
|
| 574 |
+
- `skip_memory_metrics`: True
|
| 575 |
+
- `use_legacy_prediction_loop`: False
|
| 576 |
+
- `push_to_hub`: True
|
| 577 |
+
- `resume_from_checkpoint`: None
|
| 578 |
+
- `hub_model_id`: JacobLinCool/Qwen3-Embedding-0.6B-GIR-1
|
| 579 |
+
- `hub_strategy`: every_save
|
| 580 |
+
- `hub_private_repo`: False
|
| 581 |
+
- `hub_always_push`: False
|
| 582 |
+
- `hub_revision`: None
|
| 583 |
+
- `gradient_checkpointing`: False
|
| 584 |
+
- `gradient_checkpointing_kwargs`: None
|
| 585 |
+
- `include_inputs_for_metrics`: False
|
| 586 |
+
- `include_for_metrics`: []
|
| 587 |
+
- `eval_do_concat_batches`: True
|
| 588 |
+
- `fp16_backend`: auto
|
| 589 |
+
- `push_to_hub_model_id`: None
|
| 590 |
+
- `push_to_hub_organization`: None
|
| 591 |
+
- `mp_parameters`:
|
| 592 |
+
- `auto_find_batch_size`: False
|
| 593 |
+
- `full_determinism`: False
|
| 594 |
+
- `torchdynamo`: None
|
| 595 |
+
- `ray_scope`: last
|
| 596 |
+
- `ddp_timeout`: 1800
|
| 597 |
+
- `torch_compile`: False
|
| 598 |
+
- `torch_compile_backend`: None
|
| 599 |
+
- `torch_compile_mode`: None
|
| 600 |
+
- `include_tokens_per_second`: False
|
| 601 |
+
- `include_num_input_tokens_seen`: False
|
| 602 |
+
- `neftune_noise_alpha`: None
|
| 603 |
+
- `optim_target_modules`: None
|
| 604 |
+
- `batch_eval_metrics`: False
|
| 605 |
+
- `eval_on_start`: True
|
| 606 |
+
- `use_liger_kernel`: False
|
| 607 |
+
- `liger_kernel_config`: None
|
| 608 |
+
- `eval_use_gather_object`: False
|
| 609 |
+
- `average_tokens_across_devices`: False
|
| 610 |
+
- `prompts`: None
|
| 611 |
+
- `batch_sampler`: no_duplicates
|
| 612 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 613 |
+
- `router_mapping`: {}
|
| 614 |
+
- `learning_rate_mapping`: {}
|
| 615 |
+
|
| 616 |
+
</details>
|
| 617 |
+
|
| 618 |
+
### Training Logs
|
| 619 |
+
| Epoch | Step | Validation Loss | cosine_ndcg@10 |
|
| 620 |
+
|:-------:|:------:|:---------------:|:--------------:|
|
| 621 |
+
| 0 | 0 | 0.0042 | 0.9926 |
|
| 622 |
+
| **1.0** | **25** | **0.0013** | **0.9832** |
|
| 623 |
+
|
| 624 |
+
* The bold row denotes the saved checkpoint.
|
| 625 |
+
|
| 626 |
+
### Framework Versions
|
| 627 |
+
- Python: 3.11.11
|
| 628 |
+
- Sentence Transformers: 5.1.1
|
| 629 |
+
- Transformers: 4.56.2
|
| 630 |
+
- PyTorch: 2.8.0+cu128
|
| 631 |
+
- Accelerate: 1.10.1
|
| 632 |
+
- Datasets: 4.1.1
|
| 633 |
+
- Tokenizers: 0.22.1
|
| 634 |
+
|
| 635 |
+
## Citation
|
| 636 |
+
|
| 637 |
+
### BibTeX
|
| 638 |
+
|
| 639 |
+
#### Sentence Transformers
|
| 640 |
+
```bibtex
|
| 641 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 642 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 643 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 644 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 645 |
+
month = "11",
|
| 646 |
+
year = "2019",
|
| 647 |
+
publisher = "Association for Computational Linguistics",
|
| 648 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 649 |
+
}
|
| 650 |
+
```
|
| 651 |
+
|
| 652 |
+
#### MultipleNegativesRankingLoss
|
| 653 |
+
```bibtex
|
| 654 |
+
@misc{henderson2017efficient,
|
| 655 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 656 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
| 657 |
+
year={2017},
|
| 658 |
+
eprint={1705.00652},
|
| 659 |
+
archivePrefix={arXiv},
|
| 660 |
+
primaryClass={cs.CL}
|
| 661 |
+
}
|
| 662 |
+
```
|
| 663 |
+
|
| 664 |
+
<!--
|
| 665 |
+
## Glossary
|
| 666 |
+
|
| 667 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 668 |
+
-->
|
| 669 |
+
|
| 670 |
+
<!--
|
| 671 |
+
## Model Card Authors
|
| 672 |
+
|
| 673 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 674 |
+
-->
|
| 675 |
+
|
| 676 |
+
<!--
|
| 677 |
+
## Model Card Contact
|
| 678 |
+
|
| 679 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 680 |
+
-->
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"prompts": {
|
| 3 |
+
"query": "Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery:",
|
| 4 |
+
"document": ""
|
| 5 |
+
},
|
| 6 |
+
"default_prompt_name": null,
|
| 7 |
+
"similarity_fn_name": "cosine",
|
| 8 |
+
"model_type": "SentenceTransformer",
|
| 9 |
+
"__version__": {
|
| 10 |
+
"sentence_transformers": "5.1.1",
|
| 11 |
+
"transformers": "4.56.2",
|
| 12 |
+
"pytorch": "2.8.0+cu128"
|
| 13 |
+
}
|
| 14 |
+
}
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.models.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 32768,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|