Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Problem description

Agree to Privacy Statement

mindformers.core

core module, including Runtime Context, Loss, Optimizer, Learning Rate, Callback, and Evaluation Metrics.

Runtime Context

mindformers.core.build_context

Build the context from config.

mindformers.core.get_context

Get context attribute value according to the input key.

mindformers.core.init_context

Initialize the context.

mindformers.core.set_context

Set context for running environment.

Loss

mindformers.core.CrossEntropyLoss

Calculate the cross entropy loss.

Optimizer

mindformers.core.AdamW

This is the implementation of AdamW.

mindformers.core.Came

Updates gradients by the Confidence-guided Adaptive Memory Efficient Optimization (Came) algorithm.

Learning Rate

mindformers.core.ConstantWarmUpLR

Constant Warm Up Learning Rate.

mindformers.core.CosineAnnealingLR

It has been proposed in SGDR: Stochastic Gradient Descent with Warm Restarts .

mindformers.core.CosineAnnealingWarmRestarts

Set the learning rate of each parameter group using a cosine annealing schedule, where ηmax is set to the initial lr, Tcur is the number of epochs since the last restart and Ti is the number of epochs between two warm restarts in SGDR:

mindformers.core.CosineWithRestartsAndWarmUpLR

Cosine with Restarts and Warm Up Learning Rate.

mindformers.core.CosineWithWarmUpLR

Cosine with Warm Up Learning Rate.

mindformers.core.LearningRateWiseLayer

Learning Rate Wise Layer.

mindformers.core.LinearWithWarmUpLR

Linear with Warm Up Learning Rate.

mindformers.core.PolynomialWithWarmUpLR

Polynomial with Warm Up Learning Rate.

Callback

mindformers.core.CheckpointMonitor

Checkpoint Monitor For Save LossScale.

mindformers.core.EvalCallBack

Evaluate Callback used in training progress.

mindformers.core.MFLossMonitor

Monitor loss and other parameters in training process.

mindformers.core.ProfileMonitor

Profile analysis in training.

mindformers.core.SummaryMonitor

Summary Monitor can help you to collect some common information, such as loss, learning late, computational graph and so on.

Evaluation Metric

mindformers.core.EntityScore

Evaluates the precision, recall, and F1 score of predicted entities against the ground truth.

mindformers.core.EmF1Metric

Calculate the Em and F1 scores for each example to evaluate the model's performance in prediction tasks.

mindformers.core.PerplexityMetric

Perplexity is defined as the exponentiated average negative log-probability assigned by the model to each word in the test set.

mindformers.core.PromptAccMetric

Computes the prompt acc of each entity.