kitkatdafu commited on
Commit
59953e2
β€’
1 Parent(s): 617b54b
jester-salesforce-sfr-embedding-mistral.pt β†’ jester-hkunlp-instructor-xl.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:57c09e8e086a89485f28ce672c1dfbfce3f504d0b0af00eab892617edacf40aa
3
- size 2459068
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a1f5c5711e58f62be7fd8c5f19515ea803085a20bc59abc0d80961024c2867a
3
+ size 1015255
jester-sentence-transformers-all-MiniLM-L6-v2.pt β†’ jester-salesforce-sfr-embedding-mistral.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:72c7d3133b022ec982fbf776e7a7942f05eb90e1ab9c89fecdd4c782e9f98ed7
3
- size 231898
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b3a4e5a9d197c319d440c6b3a3e5c0bd6051d4a6434c28a6ca47758559e2786
3
+ size 5473972
jester-hkunlp-instructor-xl.pt β†’ jester-sentence-transformers-all-MiniLM-L6-v2.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c34ebf11056b10879c72d2c6305431162e05f9bd0b1994542a99dc805e106c0e
3
- size 462144
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d434ebf83b188964d4c86efad16d95abaa6a4420d88bb7d43dc83a2e9a6f0868
3
+ size 507503
jester-sentence-transformers-all-mpnet-base-v2.pt β†’ jester-sentence-transformers-all-mpnet-base-v2.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c686c45e8752d76010f3d19b61482a184beb0b3f93605da205c4fb21fc634b5f
3
- size 462303
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77939f4ba48092025c7605d5457e8abc99e48c73091563102aa41aecce0481cc
3
+ size 1015275
jester_embedding.py CHANGED
@@ -1,4 +1,4 @@
1
- import torch
2
  import datasets
3
  from sklearn.model_selection import train_test_split
4
 
@@ -8,10 +8,10 @@ _HOMEPAGE = "N/A"
8
  _LICENSE = "apache-2.0"
9
 
10
  _URLS = {
11
- "mistral": "./jester-salesforce-sfr-embedding-mistral.pt",
12
- "instructor-xl": "./jester-hkunlp-instructor-xl.pt",
13
- "all-MiniLM-L6-v2": "./jester-sentence-transformers-all-MiniLM-L6-v2.pt",
14
- "all-mpnet-base-v2": "./jester-sentence-transformers-all-mpnet-base-v2.pt",
15
  }
16
 
17
 
@@ -77,7 +77,7 @@ class JesterEmbedding(datasets.GeneratorBasedBuilder):
77
  ]
78
 
79
  def _generate_examples(self, filepath, split):
80
- embeddings = torch.load(f=filepath, map_location="cpu")
81
  train, test = train_test_split(embeddings, test_size=0.2, random_state=42)
82
  train, val = train_test_split(train, test_size=0.2, random_state=42)
83
 
 
1
+ import pandas as pd
2
  import datasets
3
  from sklearn.model_selection import train_test_split
4
 
 
8
  _LICENSE = "apache-2.0"
9
 
10
  _URLS = {
11
+ "mistral": "./jester-salesforce-sfr-embedding-mistral.parquet",
12
+ "instructor-xl": "./jester-hkunlp-instructor-xl.parquet",
13
+ "all-MiniLM-L6-v2": "./jester-sentence-transformers-all-MiniLM-L6-v2.parquet",
14
+ "all-mpnet-base-v2": "./jester-sentence-transformers-all-mpnet-base-v2.parquet",
15
  }
16
 
17
 
 
77
  ]
78
 
79
  def _generate_examples(self, filepath, split):
80
+ embeddings = pd.read_parquet(filepath).values
81
  train, test = train_test_split(embeddings, test_size=0.2, random_state=42)
82
  train, val = train_test_split(train, test_size=0.2, random_state=42)
83