brittlewis12 commited on
Commit
22b128b
1 Parent(s): 1191ba1

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
  simplewiki-20240720.f16.index.br filter=lfs diff=lfs merge=lfs -text
60
  wikipedia_simple_20240720.db.br filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
  simplewiki-20240720.f16.index.br filter=lfs diff=lfs merge=lfs -text
60
  wikipedia_simple_20240720.db.br filter=lfs diff=lfs merge=lfs -text
61
+ simplewiki-20240801.f16.index.br filter=lfs diff=lfs merge=lfs -text
62
+ wikipedia_simple_20240801.db.br filter=lfs diff=lfs merge=lfs -text
simplewiki-20240720-dump.xml.bz2 → 20240720/simplewiki-20240720-dump.xml.bz2 RENAMED
File without changes
simplewiki-20240720.f16.index.br → 20240720/simplewiki-20240720.f16.index.br RENAMED
File without changes
wikipedia_simple_20240720.db.br → 20240720/wikipedia_simple_20240720.db.br RENAMED
File without changes
README.md CHANGED
@@ -57,7 +57,7 @@ text embeddings for wikipedia articles
57
  - identical recall accuracy on test queries (i8 performed poorly by contrast)
58
  * `multi` key support enabled (*so more than one chunk can refer to the same section id*)
59
 
60
- the **original [simple english wikipedia dump](https://dumps.wikimedia.org/simplewiki/20240720/)** that was used to generate these artifacts, dated 2024-07-20
61
 
62
  ### modifiable reproduction script `wikiembed.py`
63
  * *requires [msmarco distilbert tas b coreml](https://huggingface.co/ZachNagengast/coreml-msmarco-bert-base-dot-v5) model as written*
 
57
  - identical recall accuracy on test queries (i8 performed poorly by contrast)
58
  * `multi` key support enabled (*so more than one chunk can refer to the same section id*)
59
 
60
+ the **original [simple english wikipedia dump](https://dumps.wikimedia.org/simplewiki/20240801/)** that was used to generate these artifacts, dated 2024-08-01
61
 
62
  ### modifiable reproduction script `wikiembed.py`
63
  * *requires [msmarco distilbert tas b coreml](https://huggingface.co/ZachNagengast/coreml-msmarco-bert-base-dot-v5) model as written*
search.py CHANGED
@@ -25,11 +25,11 @@ def embed(text):
25
  return predictions['embeddings'][0]
26
 
27
  lang = "simple"
28
- date = "20240720"
29
  model = ct.models.CompiledMLModel('./msmarco_distilbert_base_tas_b_512_single_quantized.mlmodelc')
30
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-distilbert-base-tas-b")
31
 
32
- precision = "f32"
33
  index_path = f"./{lang}wiki-{date}.{precision}.index"
34
  index = Index.restore(index_path, view=True)
35
 
@@ -37,8 +37,9 @@ db_name = f"wikipedia_{lang}_{date}.db"
37
  conn = sqlite3.connect(db_name)
38
  cursor = conn.cursor()
39
 
40
- query = "who is the current US president?"
41
- # query = "what is the capital of AUS?"
 
42
  print(f"🔎 testing search... '{query}'")
43
  qembed = embed(query)
44
  res: Matches = index.search(qembed, 5)
 
25
  return predictions['embeddings'][0]
26
 
27
  lang = "simple"
28
+ date = "20240801"
29
  model = ct.models.CompiledMLModel('./msmarco_distilbert_base_tas_b_512_single_quantized.mlmodelc')
30
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-distilbert-base-tas-b")
31
 
32
+ precision = "f16"
33
  index_path = f"./{lang}wiki-{date}.{precision}.index"
34
  index = Index.restore(index_path, view=True)
35
 
 
37
  conn = sqlite3.connect(db_name)
38
  cursor = conn.cursor()
39
 
40
+ query = "what is the capital of AUS?"
41
+ # query = "who is the current US president?"
42
+ # query = "who was the first paraplegic to fully recover spinal & motor function after severing their spinal cord?"
43
  print(f"🔎 testing search... '{query}'")
44
  qembed = embed(query)
45
  res: Matches = index.search(qembed, 5)
simplewiki-20240801-dump.xml.bz2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abff873132d5f6214984e693abd627210694480d70cb562d5376143663a7b178
3
+ size 320782193
simplewiki-20240801.f16.index.br ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:482faf7bd9e9bd935ca72687bcb714853bf09aa2fa5171bd723040fbb852395e
3
+ size 854632343
upload.py CHANGED
@@ -18,7 +18,8 @@ def upload():
18
  repo_type="dataset",
19
  repo_id=repo_id,
20
  allow_patterns=["README.md", "*.py", "*.bz2", "*.br", "requirements.txt"],
21
- ignore_patterns=["scraps/*"]
 
22
  )
23
 
24
  upload()
 
18
  repo_type="dataset",
19
  repo_id=repo_id,
20
  allow_patterns=["README.md", "*.py", "*.bz2", "*.br", "requirements.txt"],
21
+ ignore_patterns=["scraps/*"],
22
+ delete_patterns=["*.bz2", "*.br"]
23
  )
24
 
25
  upload()
wikiembed.py CHANGED
@@ -423,5 +423,5 @@ if __name__ == "__main__":
423
  model = ct.models.CompiledMLModel('./msmarco_distilbert_base_tas_b_512_single_quantized.mlmodelc')
424
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-distilbert-base-tas-b")
425
  lang = "simple"
426
- date = "20240720"
427
  save_wiki_dump(lang, date)
 
423
  model = ct.models.CompiledMLModel('./msmarco_distilbert_base_tas_b_512_single_quantized.mlmodelc')
424
  tokenizer = AutoTokenizer.from_pretrained("sentence-transformers/msmarco-distilbert-base-tas-b")
425
  lang = "simple"
426
+ date = "20240801"
427
  save_wiki_dump(lang, date)
wikipedia_simple_20240801.db.br ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ac42dc65ae562017e3d4aed884f3242ebb1dfb21963057f90b3808d9e978a52
3
+ size 78344527