Model: CocoRoF/POLAR-Qwen3-0.6b-linq-gist
Author: CocoRoF
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, qwen3, sentence-similarity, feature-extraction, generated_from_trainer, dataset_size:500000, loss:CachedGISTEmbedLoss, dataset:CocoRoF/massive_triplet_v3, arxiv:1908.10084, base_model:Qwen/Qwen3-Embedding-0.6B, base_model:finetune:Qwen/Qwen3-Embedding-0.6B, endpoints_compatible, region:us
Base models (finetune): id: Qwen/Qwen3-Embedding-0.6B
Card metadata: tags: sentence-transformers, sentence-similarity, feature-extraction, generated_from_trainer, dataset_size:500000, loss:CachedGISTEmbedLoss
base_model: Qwen/Qwen3-Embedding-0.6B
widget: source_sentence: scramble z to retrieve negative samples, i.e. z values that should not be predicted by the model.
sentences: def get_neg_z(self, z, cur_device):

        if self.opt.sampling_method == 0:
            """carefully selecting negative samples, such that they never
            include positive samples; done individually for every time-step -->
            very slow."""
            offset = 1
            # generate uncorrelated negative samples by using an individual random
            # offset for every index
            rand_neg_idx = torch.arange(z.size(0), device=cur_device)

            rand_offset = (
                torch.multinomial(
                    torch.ones(z.size(0) - offset),
                    self.neg_samples * z.size(0),
                    replacement=True,
                )
                + offset
            )
            rand_offset = rand_offset.reshape(self.neg_samples, -1).to(cur_device)

            z_neg = torch.stack(
                [
                    torch.index_select(
                        z, 0, (rand_neg_idx + rand_offset[i]) % z.size(0)
                    )
                    for i in range(self.neg_samples)
                ],
                2,
            )
        elif self.opt.sampling_method == 1:
            """randomly selecting from all z values.

            can cause positive samples to be selected as negative
            samples as well (but probability is <0.1% in our
            experiments) done once for all time-steps, much faster.
            """
            z = self.broadcast_batch_length(z)
            z_neg = torch.stack(
                [
                    torch.index_select(
                        z, 0, torch.randperm(z.size(0), device=cur_device)
                    )
                    for i in range(self.neg_samples)
                ],
                2,
            )
            rand_neg_idx = None
            rand_offset = None

        elif self.opt.sampling_method == 2:
            """randomly selecting from z values within the same sequence.

            can cause positive samples to be selected as negative
            samples as well done once for all time-steps, much faster.
            """
            z_neg = []
            channel = z.size(-1)
            batch_dim = z.size(0)
            seq_len = z.size(1)

            for _ in range(self.neg_samples):
                rand_perm_index = torch.randperm(
                    batch_dim * seq_len, device=cur_device
                ).remainder_(seq_len)
                rand_perm_index = rand_perm_index.reshape(batch_dim, seq_len)
                batch_index_offset = (
                    torch.arange(0, batch_dim, device=cur_device) * seq_len
                )
                rand_perm_index += batch_index_offset[:, None]

                z_neg.append(
                    z.reshape(-1, channel)[rand_perm_index.view(-1)].reshape(
                        batch_dim, seq_len, channel
                    )
                )

            z_neg = torch.stack(z_neg, 3)

            rand_neg_idx = None
            rand_offset = None

        else:
            raise Exception("Invalid sampling_method option")

        return z_neg, rand_neg_idx, rand_offset, 마우스 전지방 3T3-L1세포주에 파이토케미칼을 조건에 따라 24시간 처리한 후 cell viability assay를 수행하였다., def _sample_neg(self, assign_result, num_expected):
        neg_inds = torch.nonzero(assign_result.gt_inds == 0)
        if neg_inds.numel() != 0:
            neg_inds = neg_inds.squeeze(1)
        if len(neg_inds) <= num_expected:
            return neg_inds
        elif self.neg_balance_thr <= 0:
            # uniform sampling among all negative samples
            return random_choice(neg_inds, num_expected)
        else:
            max_overlaps = assign_result.max_overlaps.cpu().numpy()
            # balance sampling for negative samples
            neg_set = set(neg_inds.cpu().numpy())
            easy_set = set(
                np.where(
                    np.logical_and(max_overlaps >= 0,
                                   max_overlaps < self.neg_balance_thr))[0])
            hard_set = set(np.where(max_overlaps >= self.neg_balance_thr)[0])
            easy_neg_inds = list(easy_set & neg_set)
            hard_neg_inds = list(hard_set & neg_set)

            num_expected_hard = int(num_expected * self.neg_hard_fraction)
            if len(hard_neg_inds) > num_expected_hard:
                sampled_hard_inds = random_choice(hard_neg_inds,
                                                  num_expected_hard)
            else:
                sampled_hard_inds = np.array(hard_neg_inds, dtype=np.int)
            num_expected_easy = num_expected - len(sampled_hard_inds)
            if len(easy_neg_inds) > num_expected_easy:
                sampled_easy_inds = random_choice(easy_neg_inds,
                                                  num_expected_easy)
            else:
                sampled_easy_inds = np.array(easy_neg_inds, dtype=np.int)
            sampled_inds = np.concatenate((sampled_easy_inds,
                                           sampled_hard_inds))
            if len(sampled_inds) < num_expected:
                num_extra = num_expected - len(sampled_inds)
                extra_inds = np.array(list(neg_set - set(sampled_inds)))
                if len(extra_inds) > num_extra:
                    extra_inds = random_choice(extra_inds, num_extra)
                sampled_inds = np.concatenate((sampled_inds, extra_inds))
            sampled_inds = torch.from_numpy(sampled_inds).long().to(
                assign_result.gt_inds.device)
            return sampled_inds, source_sentence: if you wanted to know the mean and CI of m samples taken at a value x_val
sentences: def predictSamples(m, x_val, x, y):
  n = len(x)
  x_mean = np.mean(x)
  yhat, upper, lower, stats = regression_with_CI(x, y)
  # mean at x_val:
  y_val = stats['a'] + stats['b'] * x_val
  # standard error of measurement at x_val for m samples:
  s_m = math.sqrt( stats['MS']*(1./m + 1./n + (x_val - x_mean)**2 / \
                               stats['x_SS']) )
  t, stats = studentsT(x, y, stats)
  critval = returnCritValue(n-2)
  print('Mean for %i samples at %.3f: %.3f +/- %.3f' 
        %(m, x_val, y_val, critval*s_m))
  return, async def resize_window(self, options):
        self.log_test(options['desc'] if 'desc' in options else
                      "Resizing '" + options['selector'] + "' window.")

        # await self.page.screenshot({'path': 'preresize.png'})

        win_hndl = await self.get_handle(options['selector'])
        pre_resize_bbox = await win_hndl.boundingBox()

        edge_hndl = await self.get_handle(options['selector'] + ' div.rsz-' + options['side'])
        edge_bbox = await edge_hndl.boundingBox()

        new_x = edge_bbox['x'] + \
            resize_dirs[options['side']][0] * options['distance']
        new_y = edge_bbox['y'] + \
            resize_dirs[options['side']][1] * options['distance']

        await edge_hndl.hover()
        await self.page.mouse.down()
        await self.page.mouse.move(new_x, new_y)
        await self.page.mouse.up()

        post_resize_bbox = await win_hndl.boundingBox()
        dw = post_resize_bbox['width'] - pre_resize_bbox['width']
        dh = post_resize_bbox['height'] - pre_resize_bbox['height']

        resized = ((dw != 0) or (dh != 0))
        if options['expectChange']:
            self.assertIsNot(resized, False,
                             "The '" + options['selector'] + "' element was NOT resized and should have been.")
        else:
            self.assertIsNot(resized, True,
                             "The '" + options['selector'] + "' element was resized and should NOT have been.")

        # await self.page.screenshot({'path': 'postresize.png'}), def _batch_stats(self, x):
        mu = torch.mean(x, dim=0, keepdim=True)
        var = torch.var(x, dim=0, keepdim=True)
        return mu, var, source_sentence: 백악관은 도널드 트럼프 미국 대통령이 누구와 통화를 했다고 했어?
sentences: def __str__(self):
        return '\n'.join([self.header, self.sequence, self.header2, 
                array('b', [x + self.qbase for x in self.quality]).tostring()]),  백악관은 16일(현지시간) 미-중 정상이 전날 전화통화를 통해 최근 한반도 상황을 놓고 논의했다며 이같이 전했다., 도널드 트럼프 미국 대통령, source_sentence: Return an example step handler for the given gym environemtn name, that uses the given config file.
sentences: def stub_config():
    defaults = {
        "activate_recruiter_on_start": True,
        "ad_group": "Test ad group",
        "approve_requirement": 95,
        "assign_qualifications": True,
        "auto_recruit": True,
        "aws_access_key_id": "fake aws key",
        "aws_secret_access_key": "fake aws secret",
        "aws_region": "us-east-1",
        "base_payment": 0.01,
        "base_port": 5000,
        "browser_exclude_rule": "MSIE, mobile, tablet",
        "clock_on": False,
        "contact_email_on_error": "error_contact@test.com",
        "dallinger_email_address": "test@example.com",
        "database_size": "standard-0",
        "disable_when_duration_exceeded": True,
        "enable_global_experiment_registry": False,
        "redis_size": "premium-0",
        "dashboard_user": "admin",
        "database_url": "postgresql://postgres@localhost/dallinger",
        "description": "fake HIT description",
        "duration": 1.0,
        "dyno_type": "free",
        "heroku_app_id_root": "fake-customid",
        "heroku_auth_token": "heroku secret",
        "heroku_python_version": "3.9.2",
        "heroku_team": "",
        "host": "0.0.0.0",
        "id": "TEST_EXPERIMENT_UID",  # This is a significant value; change with caution.
        "keywords": "kw1, kw2, kw3",
        "lifetime": 1,
        "lock_table_when_creating_participant": True,
        "logfile": "-",
        "loglevel": 0,
        "mode": "debug",
        "num_dynos_web": 1,
        "num_dynos_worker": 1,
        "organization_name": "Monsters University",
        "sentry": True,
        "smtp_host": "smtp.fakehost.com:587",
        "smtp_username": "fake email username",
        "smtp_password": "fake email password",
        "threads": "1",
        "title": "fake experiment title",
        "us_only": True,
        "webdriver_type": "chrome_headless",
        "whimsical": True,
        "replay": False,
        "worker_multiplier": 1.5,
    }
    from dallinger.config import Configuration, default_keys

    config = Configuration()
    for key in default_keys:
        config.register(*key)
    config.extend(defaults.copy())
    # Patch load() so we don't update any key/value pairs from actual files:
    config.load = mock.Mock(side_effect=lambda: setattr(config, "ready", True))
    config.ready = True

    return config, 상부 챔버는 심방(또는 심실)이라고 불리며, 하부 챔버는 심실이라고 불립니다. 두 개의 심방은 심장으로 들어오는 혈액을 받는 챔버 역할을 하며, 더 근육질인 심실은 혈액을 심장에서 내보냅니다., def get_step_handler_for_gym_env(gym_env_name: str, cfg: Configuration) -> StepRewardDoneHandler:

    if gym_env_name == 'Acrobot-v1':
        handler = AcrobotStepHandler(cfg)
    elif gym_env_name == 'CartPole-v1':
        handler = CartPoleStepHandler(cfg)
    elif gym_env_name == 'MountainCarContinuous-v0':
        handler = ContinuousMountainCarStepHandler(cfg)
    elif gym_env_name == 'MountainCar-v0':
        handler = MountainCarStepHandler(cfg)
    elif gym_env_name == 'Pendulum-v0':
        handler = PendulumStepHandler(cfg)
    else:
        raise NotImplementedError(f'No support for this gym env: {gym_env_name}')

    return handler, source_sentence: create list of spiders that obeys the visible projects list, through use of the spider selection menu
sentences: def create_spiders_list():
    spiders_lst = [obj for obj in globals().values() if
                   inspect.isclass(obj) and str(obj).split('.')[2] == 'spiders' and 'BaseSpider' not in str(obj)]
    visible_projects = find_visible_projects()
    spiders_dict = {i.split('.')[0]: [obj for obj in spiders_lst if i.split('.')[0] in str(obj)] for i in
                    os.listdir('HousingPriceScraper/HousingPriceScraper/spiders/SpiderGroups')[:-1] if i.split('.')[0] in visible_projects}
    if len(list(spiders_dict.keys())) > 0:
        spiders_lst = select_spiders(spiders_dict)
    else:
        print('There are no visible projects, got to set_visible_projects to set defaults')
        return False
    return spiders_lst, def game(self, game_id=None, secret=None):
        if game_id is not None:
            self.game_id = game_id

        if secret is not None:
            self.secret = secret

        return self.game_id, self.secret, def instantiate_pipelines(settings, simulator_settings):
    pipelines = []
    # lock to manage race parallel processes race conditions 
    lock = Lock()

    logger.info("\nVALIDATING PIPELINES\n")
    for p_idx, pipeline_settings in enumerate(settings.runs):

        # turn a pipeline off by specifying num_runs as 0
        num_runs = pipeline_settings.get("num_runs", 0)

        # start_idx determines the first dataset name's starting idx
        start_idx = pipeline_settings.get("start_idx", 0)

        if num_runs:
            logger.info("Validating run: {}\n".format(p_idx))
        else:
            logger.info("Skipping run: {}\n".format(p_idx))
            
        for idx in range(start_idx, start_idx + num_runs):           
            logger.info("Pipeline sub index: {}\n".format(idx))
            # class factory and instantiate pipeline object
            Pipeline = pipeline_factory(pipeline_settings["pipeline_name"])
            p = Pipeline(pipeline_settings, idx, simulator_settings)
            
            # give each pipeline an idependent logger
            log_name = "dSim_{}".format(p.pipeline_settings["dataset_name"])
            log_path = os.path.join(p.pipeline_settings["outdir"],
                                    p.pipeline_settings["dataset_name"]+'.log')
            fh = logging.FileHandler(log_path, mode='w')
            fh.setLevel(logging.DEBUG)
            format = "%(asctime)-6s: %(name)s - %(levelname)s - %(message)s"
            fmt = logging.Formatter(format)
            fh.setFormatter(fmt)
            local_logger = logging.getLogger(log_name)
            local_logger.addHandler(fh)
            logger.info("Init local logging: {}".format(log_path))
            p.logger = local_logger

            # pipeline/ dataset directory
            p.pipeline_settings["lock"] = lock

            # validate all submodules for each pipeline is ready (use local logger) 
            p.instantiate_modules()

            # append to list of instantiated pipelines
            pipelines.append(p)
    return pipelines
datasets: CocoRoF/massive_triplet_v3
pipeline_tag: sentence-similarity
library_name: sentence-transformers
Likes: 1 | All-time downloads: 68
Created: 2025-06-04 05:48:39