Machine Learning/LiftWing/API/ORES migration guide
This page provides a guide for ORES users to migrate to the Lift Wing API.
Differences between ORES and Lift Wing
Before you start migrating, it may be helpful to understand the basic differences between ORES and Lift Wing.
Service architecture and request structure
Lift Wing is a generic model hosting platform, while ORES is a scoring service only for article revisions. Lift Wing hosts models as microservices: each model serves predictions through its own model server. So, to get a prediction from more than one model using the same input data, you must issue calls to each model. In comparison, ORES acts as a scoring aggregator, and can return predictions for many scores and many article revisions with a single call.
For example, the following ORES call fetches the predictions for article revision with id 123 for the models damaging and goodfaith:
curl https://ores.wikimedia.org/v3/scores/enwiki/123?models=damaging|goodfaith
In Lift Wing, the ORES example above would require two calls: one for each model service:
curl https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-damaging:predict -X POST -d '{"rev_id": 123}'
curl https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-goodfaith:predict -X POST -d '{"rev_id": 123}'
Migrating to microservices built with Lift Wing offers the following advantages:
- Scalability: Microservices can be independently scaled based on demand, allowing for more efficient resource utilization and improved performance.
- Flexibility: Microservices architecture enables the use of different languages, and frameworks for each model service, providing greater flexibility in development.
- Faster Deployment: Smaller code bases and independent deployment of microservices enable faster and more frequent releases, accelerating release to production.
- Fault Isolation: Failure in one microservice is less likely to impact the entire system, improving overall system resilience and up-time.
To learn more about rationale and plans for modernizing Wikimedia ML infrastructure, see Machine Learning/Modernization.
Caching
In ORES, a precache is a cache that is updated whenever a new revision is made. This helps decrease latency in subsequent identical calls. Although caching is an important aspect of any service, as of 2026 Lift Wing doesn't offer caching. The main reason for this is that Lift Wing is a general purpose system, which could lead to increased complexity when implementing a caching mechanism. The addition of such a feature in Lift Wing will be taken under consideration if it is seen as a necessity for users.
Modern alternatives for ORES and Revscoring models
In the Lift Wing system, models migrated from ORES are collectively referred to as Revscoring models. These models continue to be available on Lift Wing, but the ML team is not going to improve them further (re-training, add support for new wikis, new data labeling, etc.). They won't be removed from Lift Wing without a community consultation and approval process.
A newer, more modern set of models is now available, and can replace several of the Revscoring models. These newer models are multilingual or language-agnostic, and were usually trained with fresher data. The following table shows which Revscoring models have more modern replacements already available through the Lift Wing API:
| ORES model | Lift Wing Revscoring model | Lift Wing modernized model | |
|---|---|---|---|
| Edit quality | goodfaith | goodfaith | Multilingual, language-agnostic, or wikidata revert risk |
| damaging | damaging | ||
| reverted | reverted | ||
| Article quality | draftquality | draftquality | |
| articlequality | articlequality | Language-agnostic article quality | |
| Topic models | drafttopic | drafttopic | |
| articletopic | articletopic | Language-agnostic link-based article topic |
Example process to migrate your code
For this example, imagine you have an anti-vandalism tool that runs on Toolforge, and listens to revision-create events. The tool calls ORES for goodfaith and damaging scores for every revision id, taking appropriate actions afterwards.
Understand Lift Wing and decide which models to use
- Read and understand the differences between Lift Wing and ORES described above.
- Discover that your tool uses a single call to retrieve multiple scores from ORES, so you'll have to adjust to retrieve the
goodfaithanddamagingscores separately, in two HTTP calls. - Consult the mapping of ORES models to modern Lift Wing models. Note that the Multilingual or language-agnostic revert risk models are more modern replacements for
goodfaithanddamagingmodels combined. These newer models offer a single score you can use in your anti-vandalism tool. They were trained with fresher data, and offer better performance and coverage compared to the revscoring models. - Decide if you want to move away from the revscoring
goodfaithanddamagingmodels now, or leave that for the future (they will eventually be deprecated, see ORES).
Change your code to use Lift Wing API
At this point, you know that your tool can either:
- make two calls to Lift Wing to retrieve a revscoring
goodfaithanddamagingscore for a rev-id, or - make a single call to retrieve a
revertriskscore.
Now, you must figure out how to use the Lift Wing API to get predictions from the model(s) you decided to use.
- Since Toolforge tools are considered "external", use the Lift Wing API guide for external users.
- Consult the rate limits section to understand which client type fits your use case. For this example, imagine your tool is a low-traffic one, so the restriction of 50k requests/hour fits the
anonymousclient type. To make more than those 50k requests/hour, you'd have to request an authentication token following the process described at https://api.wikimedia.org/wiki/Authentication. - You're almost done! Change the HTTP calls in your code to call
api.wikimedia.orginstead ofores.wikimedia.org. The following table shows how to change specific ORES requests to retrieve the same data from Lift Wing services:
| ORES | Lift Wing revscoring models |
|---|---|
curl https://ores.wikimedia.org/v3/scores/enwiki/12345?models=goodfaith |
curl https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-goodfaith:predict -X POST -d '{"rev_id": 12345}' |
curl 'https://ores.wikimedia.org/v3/scores/enwiki/12345?models=goodfaith|damaging' |
curl https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-goodfaith:predict -X POST -d '{"rev_id": 12345}'
|
curl https://ores.wikimedia.org/v3/scores/enwiki/12345/goodfaith?features=True |
curl https://api.wikimedia.org/service/lw/inference/v1/models/enwiki-goodfaith:predict -X POST -d '{"rev_id": 12345, "extended_output": "True"}' |
| ORES | Lift Wing Revert Risk models |
|---|---|
curl https://ores.wikimedia.org/v3/scores/enwiki/12345?models=goodfaith |
curl https://api.wikimedia.org/service/lw/inference/v1/models/revertrisk-language-agnostic:predict -X POST -d '{"rev_id": 12345, "lang": "en"}' |
curl https://ores.wikimedia.org/v3/scores/enwiki/12345?models=goodfaith |
curl https://api.wikimedia.org/service/lw/inference/v1/models/revertrisk-multilingual:predict -X POST -d '{"rev_id": 12345, "lang": "en"}' |
For full details and additional example calls, see the Lift Wing API reference. If you need help or have questions, contact the ML team.