DeepMount00 commited on
Commit
27a3f57
1 Parent(s): 59feb7d

Upload MambaForCausalLM

Browse files
Files changed (3) hide show
  1. README.md +4 -4
  2. config.json +1 -1
  3. model.safetensors +1 -1
README.md CHANGED
@@ -1,9 +1,9 @@
1
  ---
 
 
2
  license: apache-2.0
3
  datasets:
4
  - DeepMount00/gquad_it
5
- language:
6
- - it
7
  pipeline_tag: question-answering
8
  ---
9
 
@@ -28,11 +28,11 @@ def predict(contesto, domanda):
28
 
29
  input_ids = tokenizer([prompt], return_tensors="pt").to(device)
30
 
31
- generate_ids = model.generate(**input_ids, max_new_tokens=150, eos_token_id=8112)
32
 
33
  answer = tokenizer.batch_decode(generate_ids)
34
  try:
35
- final_answer = answer[0].split("##RISPOSTA: ")[1].split("##END")[0].strip("\n")
36
  except IndexError:
37
  final_answer = ""
38
  return final_answer
 
1
  ---
2
+ language:
3
+ - it
4
  license: apache-2.0
5
  datasets:
6
  - DeepMount00/gquad_it
 
 
7
  pipeline_tag: question-answering
8
  ---
9
 
 
28
 
29
  input_ids = tokenizer([prompt], return_tensors="pt").to(device)
30
 
31
+ generate_ids = model.generate(**input_ids, max_new_tokens=150, eos_token_id=0)
32
 
33
  answer = tokenizer.batch_decode(generate_ids)
34
  try:
35
+ final_answer = answer[0].split("##RISPOSTA: ")[1].split('\n', 1)[0]
36
  except IndexError:
37
  final_answer = ""
38
  return final_answer
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "mamba_qa/checkpoint-33000",
3
  "architectures": [
4
  "MambaForCausalLM"
5
  ],
 
1
  {
2
+ "_name_or_path": "mamba_qa/checkpoint-43000",
3
  "architectures": [
4
  "MambaForCausalLM"
5
  ],
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1c9306579a959a462a03648db26a708c2756e2eb1ef3d35684811db590bbdd06
3
  size 3172869936
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aaa63c9947dac0db02479bb3b718f2e0d8d291ef9bf1b88caeb681767d1302fc
3
  size 3172869936