Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
ca386392
Commit
ca386392
authored
Aug 07, 2023
by
baberabb
Browse files
added typehints to readme
parent
a5d57f15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
docs/model_guide.md
docs/model_guide.md
+7
-3
No files found.
docs/model_guide.md
View file @
ca386392
...
...
@@ -36,15 +36,19 @@ The LM class enforces a common interface via which we can extract responses from
```
python
class
MyCustomLM
(
LM
):
#...
def
loglikelihood
(
self
,
requests
):
def
loglikelihood
(
self
,
requests
:
list
[
Instance
])
->
list
[
tuple
[
float
,
bool
]]:
#...
def
loglikelihood_rolling
(
self
,
requests
):
def
loglikelihood_rolling
(
self
,
requests
:
list
[
Instance
])
->
list
[
tuple
[
float
,
bool
]]:
#...
def
greedy_until
(
self
,
requests
):
def
greedy_until
(
self
,
requests
:
list
[
Instance
])
->
list
[
str
]:
#...
#...
```
Where
`Instance`
is a dataclass defined in
[
`lm_eval.api.instance`
](
https://github.com/EleutherAI/lm-evaluation-harness/blob/big-refactor/lm_eval/api/instance.py
)
with property
`args`
which returns a tuple of (context, continuation).
We support
...
...
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