Skip to content

Commit c2c41a3

Browse files
committed
Fix
1 parent e8a19d3 commit c2c41a3

File tree

89 files changed

+178
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+178
-178
lines changed

paddlenlp/data/vocab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class Vocab(object):
2727
store/load functions.
2828
2929
Args:
30-
counter (collections.Counter, optional): A Counter intance describes
31-
the tokens and their frequencies. Its keys will be indexed accroding
30+
counter (collections.Counter, optional): A Counter instance describes
31+
the tokens and their frequencies. Its keys will be indexed according
3232
to the order of frequency sorting to construct mapping relationship.
3333
If None, `token_to_idx` must be provided as the mapping relationship.
3434
Default: None.

paddlenlp/datasets/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def remove_if_exit(filepath):
570570
datasets = DatasetTuple(splits)
571571
parallel_env = dist.ParallelEnv()
572572
unique_endpoints = _get_unique_endpoints(parallel_env.trainer_endpoints[:])
573-
# move register hook to first and register togather
573+
# move register hook to first and register together
574574
lock_files = []
575575
for split in splits:
576576
lock_file = os.path.join(DATA_HOME, self.__class__.__name__)

paddlenlp/experimental/autonlp/README_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**The AutoNLP APIs are subjective to significant changes until formal release**
88

9-
**AutoNLP** is an experimental project by PaddleNLP to democratize NLP for everyone. Delivering a successful NLP project is not easy, as it requires deep domain knowledge. Time after time, we have seen people struggle to make NLP work on their dataset, for their projects, which is why we are building **AutoNLP**. Compared with the traditional AutoML approach of massive paid compute for State-of-the-Art model performance, we have a different philosphy:
9+
**AutoNLP** is an experimental project by PaddleNLP to democratize NLP for everyone. Delivering a successful NLP project is not easy, as it requires deep domain knowledge. Time after time, we have seen people struggle to make NLP work on their dataset, for their projects, which is why we are building **AutoNLP**. Compared with the traditional AutoML approach of massive paid compute for State-of-the-Art model performance, we have a different philosophy:
1010

1111

1212
1. Instead of training State-of-the-Art models on huge datasets running on huge clusters, our goal is to deliver **decent models under limited compute**. We assume our users have a few GPUs at most and want to get decent models under 8 hours on their own in-house datasets. Note that you can get this level of compute for FREE on [Baidu AI Studio](https://aistudio.baidu.com/aistudio).

paddlenlp/experimental/faster_tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def to_vocab_buffer(vocab_dict, name):
4646
NOTICE: The value will be held in the cpu place.
4747
4848
Args:
49-
vocab_dict(dict): The value will be setted to the tensor.
49+
vocab_dict(dict): The value will be set to the tensor.
5050
The key is token and the value is the token index.
5151
name(string): The name of the tensor.
5252
"""

paddlenlp/experimental/transformers/qwen/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def forward(
499499
hidden_states = outputs[0]
500500

501501
# if labels is None,means we need full output, instead of tensor_parallel_output
502-
# tensor_parallel_output is togather with ParallelCrossEntropy
502+
# tensor_parallel_output is together with ParallelCrossEntropy
503503
tensor_parallel_output = (
504504
self.config.tensor_parallel_output and labels is not None and self.config.tensor_parallel_degree > 1
505505
)

paddlenlp/experimental/transformers/qwen2/modeling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ def forward(
12101210
hidden_states = outputs[0]
12111211

12121212
# if labels is None,means we need full output, instead of tensor_parallel_output
1213-
# tensor_parallel_output is togather with ParallelCrossEntropy
1213+
# tensor_parallel_output is together with ParallelCrossEntropy
12141214
tensor_parallel_output = (
12151215
self.config.tensor_parallel_output and labels is not None and self.config.tensor_parallel_degree > 1
12161216
)

paddlenlp/generation/logits_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def __init__(self, sequence_bias: Dict[Tuple[int], float]):
439439
self._validate_arguments()
440440

441441
# Bias variables that will be populated on the first call (for retrocompatibility purposes, the vocabulary size
442-
# is infered in the first usage, which inhibits initializing here)
442+
# is inferred in the first usage, which inhibits initializing here)
443443
self.length_1_bias = None
444444
self.prepared_bias_variables = False
445445

paddlenlp/layers/crf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def __init__(self, crf):
248248
self.crf = crf
249249
if isinstance(crf, paddle.Tensor):
250250
raise ValueError(
251-
"From paddlenlp >= 2.0.0b4, the first param of LinearChainCrfLoss shoule be a LinearChainCrf object. For input parameter 'crf.transitions', you can remove '.transitions' to 'crf'"
251+
"From paddlenlp >= 2.0.0b4, the first param of LinearChainCrfLoss should be a LinearChainCrf object. For input parameter 'crf.transitions', you can remove '.transitions' to 'crf'"
252252
)
253253

254254
def forward(self, inputs, lengths, labels, old_version_labels=None):

paddlenlp/ops/distributed/parallel.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ def __init__(self, size, num_partitions=1, gather_out=True, param_attr=None, bia
191191
main_block = paddle.static.default_main_program().global_block()
192192
startup_block.vars[weight.name].is_distributed = True
193193
main_block.vars[weight.name].is_distributed = True
194-
# set is_distributed for splited bias
195-
# if a linear layer is splited by col, the bias would also be split into each rank as its weight
194+
# set is_distributed for split bias
195+
# if a linear layer is split by col, the bias would also be split into each rank as its weight
196196
if self.linear._bias_attr:
197197
startup_block.vars[self.linear.bias.name].is_distributed = True
198198
main_block.vars[self.linear.bias.name].is_distributed = True
@@ -285,8 +285,8 @@ def __init__(self, size, num_partitions=1, input_is_parallel=False, param_attr=N
285285
main_block = paddle.static.default_main_program().global_block()
286286
startup_block.vars[weight.name].is_distributed = True
287287
main_block.vars[weight.name].is_distributed = True
288-
# set is_distributed for splited bias
289-
# if a linear layer is splited by row, each rank would hold a complete bias
288+
# set is_distributed for split bias
289+
# if a linear layer is split by row, each rank would hold a complete bias
290290

291291
if bias_attr is not False:
292292
self.bias = self.create_parameter(shape=[num_cols], attr=bias_attr, dtype=self._dtype, is_bias=True)

paddlenlp/quantization/checkpoint_quantization_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def group_wise_quant_dequant(
6363
tp_degree (`int`):
6464
Tensor parallel world size.
6565
use_pd (`bool`):
66-
Whether to use paddle caculation. If False will use numpy.
66+
Whether to use paddle calculation. If False will use numpy.
6767
symmetry (`bool`):
6868
Whether to use symmetry quantization.
6969
"""
@@ -201,7 +201,7 @@ def cal_abs_min_max_channel(inputs, quant_axis=1):
201201
inputs (`numpy.array`):
202202
input tensor for quantization.
203203
quant_axis (`int`):
204-
dimension where calulating inputs' abs min and max scales on.
204+
dimension where calculating inputs' abs min and max scales on.
205205
"""
206206
eps = 1e-8
207207
reduce_axis = tuple([i for i in range(len(inputs.shape)) if i != quant_axis])
@@ -227,7 +227,7 @@ def asymmetry_qdq_weight(
227227
quant_bits (`int`):
228228
Quantization bits.
229229
quant_axis (`int`):
230-
Scales caculation axis.
230+
Scales calculation axis.
231231
mins (`paddle.Tensor`):
232232
Min scales tensor in asymmetry quantization.
233233
maxs (`paddle.Tensor`):
@@ -239,7 +239,7 @@ def asymmetry_qdq_weight(
239239
tp_degree (`int`):
240240
Model parallel world size.
241241
use_pd (`bool`):
242-
Whether to use paddle caculation. If False will use numpy.
242+
Whether to use paddle calculation. If False will use numpy.
243243
"""
244244

245245
if mins is None:
@@ -288,7 +288,7 @@ def cal_abs_max_channel(inputs, quant_axis=1):
288288
inputs (`numpy.array`):
289289
input tensor for quantization.
290290
quant_axis (`int`):
291-
dimension where calulating inputs' abs max scales on.
291+
dimension where calculating inputs' abs max scales on.
292292
"""
293293
epsilon = 1e-8
294294
reduce_axis = tuple([i for i in range(len(inputs.shape)) if i != quant_axis])
@@ -311,7 +311,7 @@ def qdq_weight(x, quant_bit=8, quant_axis=-1, scales=None, dequant=False, tp_ran
311311
quant_bits (`int`):
312312
Quantization bits.
313313
quant_axis (`int`):
314-
Scales caculation axis.
314+
Scales calculation axis.
315315
scales (`paddle.Tensor`):
316316
Abs max scales tensor in symmetry quantization.
317317
dequant (`bool`):
@@ -321,7 +321,7 @@ def qdq_weight(x, quant_bit=8, quant_axis=-1, scales=None, dequant=False, tp_ran
321321
tp_degree (`int`):
322322
Model parallel world size.
323323
use_pd (`bool`):
324-
Whether to use paddle caculation. If False will use numpy.
324+
Whether to use paddle calculation. If False will use numpy.
325325
"""
326326

327327
if scales is None:

0 commit comments

Comments
 (0)