OpenICL icon indicating copy to clipboard operation
OpenICL copied to clipboard

OpenICL is an open-source framework to facilitate research, development, and prototyping of in-context learning.

Results 9 OpenICL issues
Sort by recently updated
recently updated
newest added

Hello, I am trying to reproduce the results of your paper to gain a deeper understanding. Could you please upload the code for all your experimental results? I see only...

Could you please consider compatibility with faiss-cpu? There is no faiss_gpu for python >= 3.11

``` def vote_k_search(self): vote_k_idxs = self.votek_select(embeddings=self.embed_list, select_num=self.ice_num, k=self.votek_k, overlap_threshold=1) return [vote_k_idxs[:] for _ in range(len(self.test_ds))] ``` why?

I met: ``` File "/mnt/sharedata/hdd/zhouxn/ICLCP/group_distance_k.py", line 33, in group_with_distance retriever = TopkRetriever(data, ice_num=3, batch_size=args.batch_size, index_split='train', test_split='test') File "/mnt/sharedata/hdd/zhouxn/ICLCP/openicl/icl_retriever/icl_topk_retriever.py", line 78, in __init__ self.index = self.create_index() File "/mnt/sharedata/hdd/zhouxn/ICLCP/openicl/icl_retriever/icl_topk_retriever.py", line 86, in...

This library maybe cannot be installed in win64 sys because of faiss-gpu.

In [__get_ppl()](https://github.com/Shark-NLP/OpenICL/blob/1613ae10b88ba2dbfed425c4ee078b2a6586152e/openicl/icl_inferencer/icl_ppl_inferencer.py#L164) of `PPLInferencer`, at [line 186](https://github.com/Shark-NLP/OpenICL/blob/1613ae10b88ba2dbfed425c4ee078b2a6586152e/openicl/icl_inferencer/icl_ppl_inferencer.py#L186) ```python lens = (inputs["input_ids"] != self.tokenizer.pad_token_id).sum(-1).cpu().numpy() ``` where it tries to calculate the token number of each text sample in `input_texts`, by count...

add non_blocking arg in `ListWrapper.to` to support `transformers>=4.48.0`. For `transformers "BatchEncoding": """ Send all values to device by calling `v.to(device)` (PyTorch only). Args: device (`str` or `torch.device`): The device to...

https://github.com/Shark-NLP/OpenICL/blob/1613ae10b88ba2dbfed425c4ee078b2a6586152e/openicl/icl_retriever/icl_topk_retriever.py#L113 When using faiss for candidate example selection, the vector inner product distance is the closest. Why not use cosine similarity? The embedding is not normalized, and the calculation results...