Skip to content

Commit 7887172

Browse files
authored
fix: multiple typos of different value (#782)
* Update quicktour.mdx * Update peft_model.yaml * Update evaluation_tracker.py * Update bert_scorer.py
1 parent 8805035 commit 7887172

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/source/quicktour.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ To evaluate a model trained with nanotron on a single gpu.
179179
```
180180

181181
The `nproc-per-node` argument should match the data, tensor and pipeline
182-
parallelism confidured in the `lighteval_config_template.yaml` file.
182+
parallelism configured in the `lighteval_config_template.yaml` file.
183183
That is: `nproc-per-node = data_parallelism * tensor_parallelism *
184184
pipeline_parallelism`.

examples/model_configs/peft_model.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
model_parameters:
22
model_name: "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B" # pretrained=model_name,trust_remote_code=boolean,revision=revision_to_use,model_parallel=True ... For a PEFT model, the pretrained model should be the one trained with PEFT and the base model below will contain the original model on which the adapters will be applied.
3-
tokenizer: null # name of tokenier to use if defferent from the model's default
3+
tokenizer: null # name of tokenizer to use if different from the model's default
44
subfolder: null # subfolder in the model's directory to use
55
dtype: "float16" # Specifying the model to be loaded in 4 bit uses BitsAndBytesConfig. The other option is to use "8bit" quantization.
66
compile: true

src/lighteval/logging/evaluation_tracker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def recreate_metadata_card(self, repo_id: str) -> None: # noqa: C901
579579
new_dictionary.update(results_dict)
580580
results_string = json.dumps(new_dictionary, indent=4)
581581

582-
# If we are pushing to the Oppen LLM Leaderboard, we'll store specific data in the model card.
582+
# If we are pushing to the Open LLM Leaderboard, we'll store specific data in the model card.
583583
is_open_llm_leaderboard = repo_id.split("/")[0] == "open-llm-leaderboard"
584584
if is_open_llm_leaderboard:
585585
org_string = (
@@ -695,7 +695,7 @@ def push_to_tensorboard( # noqa: C901
695695
# We are doing parallel evaluations of multiple checkpoints and recording the steps not in order
696696
# This messes up with tensorboard, so the easiest is to rename files in the order of the checkpoints
697697
# See: https://github.com/tensorflow/tensorboard/issues/5958
698-
# But tensorboardX don't let us control the prefix of the files (only the suffix), so we need to do it ourselves before commiting the files
698+
# But tensorboardX don't let us control the prefix of the files (only the suffix), so we need to do it ourselves before committing the files
699699

700700
# tb_context.close() # flushes the unfinished write operations
701701
time.sleep(5)

src/lighteval/metrics/imports/bert_scorer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def bert_encode(model, x, attention_mask, all_layers=False):
7474

7575
def collate_idf(arr, tokenizer, idf_dict, device="cuda:0"):
7676
"""
77-
Helper function that pads a list of sentences to hvae the same length and
77+
Helper function that pads a list of sentences to have the same length and
7878
loads idf score for words in the sentences.
7979
8080
Args:
@@ -161,20 +161,20 @@ def greedy_cos_idf(
161161
Args:
162162
- :param: `ref_embedding` (torch.Tensor):
163163
embeddings of reference sentences, BxKxd,
164-
B: batch size, K: longest length, d: bert dimenison
164+
B: batch size, K: longest length, d: bert dimension
165165
- :param: `ref_lens` (list of int): list of reference sentence length.
166166
- :param: `ref_masks` (torch.LongTensor): BxKxK, BERT attention mask for
167167
reference sentences.
168168
- :param: `ref_idf` (torch.Tensor): BxK, idf score of each word
169169
piece in the reference sentence
170170
- :param: `hyp_embedding` (torch.Tensor):
171171
embeddings of candidate sentences, BxKxd,
172-
B: batch size, K: longest length, d: bert dimenison
172+
B: batch size, K: longest length, d: bert dimension
173173
- :param: `hyp_lens` (list of int): list of candidate sentence length.
174174
- :param: `hyp_masks` (torch.LongTensor): BxKxK, BERT attention mask for
175175
candidate sentences.
176176
- :param: `hyp_idf` (torch.Tensor): BxK, idf score of each word
177-
piece in the candidate setence
177+
piece in the candidate sentence
178178
"""
179179
ref_embedding.div_(torch.norm(ref_embedding, dim=-1).unsqueeze(-1))
180180
hyp_embedding.div_(torch.norm(hyp_embedding, dim=-1).unsqueeze(-1))
@@ -255,7 +255,7 @@ def bert_cos_score_idf(
255255
- :param: `model` : a BERT model in `pytorch_pretrained_bert`
256256
- :param: `refs` (list of str): reference sentences
257257
- :param: `hyps` (list of str): candidate sentences
258-
- :param: `tokenzier` : a BERT tokenizer corresponds to `model`
258+
- :param: `tokenizer` : a BERT tokenizer corresponds to `model`
259259
- :param: `idf_dict` : a dictionary mapping a word piece index to its
260260
inverse document frequency
261261
- :param: `verbose` (bool): turn on intermediate status update
@@ -339,7 +339,7 @@ def __init__(
339339
):
340340
"""
341341
Args:
342-
- :param: `model_type` (str): contexual embedding model specification, default using the suggested
342+
- :param: `model_type` (str): contextual embedding model specification, default using the suggested
343343
model for the target langauge; has to specify at least one of
344344
`model_type` or `lang`
345345
- :param: `num_layers` (int): the layer of representation to use.

0 commit comments

Comments
 (0)