wanadzhar913 commited on
Commit
99e280b
·
verified ·
1 Parent(s): 74e8fb1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -8
README.md CHANGED
@@ -77,7 +77,6 @@ pipe = pipeline(
77
  device=0,
78
  )
79
 
80
-
81
  # create a prompt template
82
  prompt = """Anda adalah pakar dalam mengesan ketidakkonsistenan fakta dan halusinasi. Anda akan diberi satu dokumen dan satu soalan. Baca
83
  dokumen dan soalan/kenyataan yang diberikan dengan teliti dan kenal pasti Ketidakkonsistenan Fakta (iaitu mana-mana soalan/kenyataan yang
@@ -102,7 +101,6 @@ Soalan/Kenyataan: {question}
102
 
103
  Kembalikan pilihan konsistenan dalam format JSON untuk pilihan yang diberikan. Sebagai contoh: {{'consistency': 1}} atau {{'consistency': 0}}"""
104
 
105
-
106
  # https://www.thestar.com.my/business/business-news/2024/10/23/strong-support-for-chip-sector-under-budget-2025
107
  passage_english = """
108
  KUALA LUMPUR: Budget 2025 has set aside sizeable funds, both fiscal and non-fiscal, to ensure the success of the National Semiconductor Strategy (NSS), which is part of the New Industrial Master Plan 2030 (NIMP 2030), says Investment, Trade and Industry (Miti) Minister Tengku Datuk Seri Zafrul Abdul Aziz.
@@ -121,16 +119,13 @@ When asked how the new tax would help finance the bigger budget of RM421bil, he
121
 
122
  “Yes, I am quite confident that we will meet the budget estimate. We have been meeting our deficit target, for example, and I think we will hopefully achieve it (fiscal target) in 2024,” he said.
123
 
124
- The ministry will also continue with initiatives to drive trade and investments to spur the country’s growth, added Tengku Zafrul. — Bernama
125
- """
126
-
127
 
128
  question_english = "Zafrul will not meet the budget deficit."
129
 
130
-
131
  pipe(
132
  prompt.format(passage=passage_english, question=question_english),
133
- max_new_tokens = 1024,
134
  return_full_text=False,
135
  temperature = 0.1,
136
  do_sample = True,
@@ -138,5 +133,6 @@ pipe(
138
  top_k = 50,
139
  )[0]['generated_text']
140
 
141
- >>> {consistency": 0} # you'll probably have to use some regex to parse the outputs
 
142
  ```
 
77
  device=0,
78
  )
79
 
 
80
  # create a prompt template
81
  prompt = """Anda adalah pakar dalam mengesan ketidakkonsistenan fakta dan halusinasi. Anda akan diberi satu dokumen dan satu soalan. Baca
82
  dokumen dan soalan/kenyataan yang diberikan dengan teliti dan kenal pasti Ketidakkonsistenan Fakta (iaitu mana-mana soalan/kenyataan yang
 
101
 
102
  Kembalikan pilihan konsistenan dalam format JSON untuk pilihan yang diberikan. Sebagai contoh: {{'consistency': 1}} atau {{'consistency': 0}}"""
103
 
 
104
  # https://www.thestar.com.my/business/business-news/2024/10/23/strong-support-for-chip-sector-under-budget-2025
105
  passage_english = """
106
  KUALA LUMPUR: Budget 2025 has set aside sizeable funds, both fiscal and non-fiscal, to ensure the success of the National Semiconductor Strategy (NSS), which is part of the New Industrial Master Plan 2030 (NIMP 2030), says Investment, Trade and Industry (Miti) Minister Tengku Datuk Seri Zafrul Abdul Aziz.
 
119
 
120
  “Yes, I am quite confident that we will meet the budget estimate. We have been meeting our deficit target, for example, and I think we will hopefully achieve it (fiscal target) in 2024,” he said.
121
 
122
+ The ministry will also continue with initiatives to drive trade and investments to spur the country’s growth, added Tengku Zafrul. — Bernama"""
 
 
123
 
124
  question_english = "Zafrul will not meet the budget deficit."
125
 
 
126
  pipe(
127
  prompt.format(passage=passage_english, question=question_english),
128
+ max_new_tokens = 8,
129
  return_full_text=False,
130
  temperature = 0.1,
131
  do_sample = True,
 
133
  top_k = 50,
134
  )[0]['generated_text']
135
 
136
+ # you'll probably have to use some regex to parse the outputs
137
+ >>> {consistency": 0}
138
  ```