Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
22_23-J 25
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23-J 25
22_23-J 25
Commits
53c8618b
Commit
53c8618b
authored
Feb 03, 2023
by
Ranodya M.J.C IT19987644
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trained the model and modify the law_ai_qna.py file
parent
6ea46ecd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
backend/law_ai_qna.py
backend/law_ai_qna.py
+20
-1
No files found.
backend/law_ai_qna.py
View file @
53c8618b
...
...
@@ -28,4 +28,23 @@ class QnADataset(Dataset):
def
__len__
(
self
):
return
len
(
self
.
question_encoding
)
dataset
=
QnADataset
(
question_encoding
,
answer_encoding
)
\ No newline at end of file
dataset
=
QnADataset
(
question_encoding
,
answer_encoding
)
training_args
=
TrainingArguments
(
output_dir
=
'Question n Answering'
,
# output directory
num_train_epochs
=
1
,
# total # of training epochs
per_device_train_batch_size
=
100
,
# batch size per device during training
per_device_eval_batch_size
=
100
,
# batch size for evaluation
warmup_steps
=
500
,
# number of warmup steps for learning rate scheduler
weight_decay
=
0.01
,
# strength of weight decay
logging_dir
=
'Question n Answering/logs'
,
# directory for storing logs
logging_steps
=
10
)
trainer
=
Trainer
(
model
=
model
,
# the instantiated 🤗 Transformers model to be trained
args
=
training_args
,
# training arguments, defined above
train_dataset
=
dataset
# evaluation dataset
)
trainer
.
train
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment