Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
pbevan1 /llama-3.1-8b-ocr-correction:29999d2d
This version has been disabled because it consistently fails to complete setup.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run pbevan1/llama-3.1-8b-ocr-correction using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"pbevan1/llama-3.1-8b-ocr-correction:29999d2d565129e1efb93fd6deaf088bf58ce05f98c6e1f61c0d514ec10de32d",
{
input: {
inp: "Do Not Kule Oi't hy.er-l'rieed AjijqIi: imac - Analyst (fteuiers) Hcuiers - A | ) | ilf, <;/) in |) nter |iic . conic! deeiilf. l.o sell n lower-|)rieofl wersinn oi its Macintosh cornutor to nttinct ronsnnu-rs already euami'red ot its iPod music jiayo-r untl annoyoil. by sccnrit.y problems ivitJi Willtlows PCs , Piper.iaffray analyst. (Jcne Muster <aid on Tlinrtiday.",
top_k: 50,
top_p: 1,
do_sample: false,
instruction: "You are an assistant that takes a piece of text that has been corrupted during OCR digitisation, and produce a corrected version of the same text.",
temperature: 1,
max_new_tokens: 5000,
repetition_penalty: 1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run pbevan1/llama-3.1-8b-ocr-correction using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pbevan1/llama-3.1-8b-ocr-correction:29999d2d565129e1efb93fd6deaf088bf58ce05f98c6e1f61c0d514ec10de32d",
input={
"inp": "Do Not Kule Oi't hy.er-l'rieed AjijqIi: imac - Analyst (fteuiers) Hcuiers - A | ) | ilf, <;/) in |) nter |iic . conic! deeiilf. l.o sell n lower-|)rieofl wersinn oi its Macintosh cornutor to nttinct ronsnnu-rs already euami'red ot its iPod music jiayo-r untl annoyoil. by sccnrit.y problems ivitJi Willtlows PCs , Piper.iaffray analyst. (Jcne Muster <aid on Tlinrtiday.",
"top_k": 50,
"top_p": 1,
"do_sample": False,
"instruction": "You are an assistant that takes a piece of text that has been corrupted during OCR digitisation, and produce a corrected version of the same text.",
"temperature": 1,
"max_new_tokens": 5000,
"repetition_penalty": 1
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run pbevan1/llama-3.1-8b-ocr-correction using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "pbevan1/llama-3.1-8b-ocr-correction:29999d2d565129e1efb93fd6deaf088bf58ce05f98c6e1f61c0d514ec10de32d",
"input": {
"inp": "Do Not Kule Oi\'t hy.er-l\'rieed AjijqIi: imac - Analyst (fteuiers) Hcuiers - A | ) | ilf, <;/) in |) nter |iic . conic! deeiilf. l.o sell n lower-|)rieofl wersinn oi its Macintosh cornutor to nttinct ronsnnu-rs already euami\'red ot its iPod music jiayo-r untl annoyoil. by sccnrit.y problems ivitJi Willtlows PCs , Piper.iaffray analyst. (Jcne Muster <aid on Tlinrtiday.",
"top_k": 50,
"top_p": 1,
"do_sample": false,
"instruction": "You are an assistant that takes a piece of text that has been corrupted during OCR digitisation, and produce a corrected version of the same text.",
"temperature": 1,
"max_new_tokens": 5000,
"repetition_penalty": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-07-30T14:32:39.491059Z",
"created_at": "2024-07-30T14:30:56.753000Z",
"data_removed": false,
"error": null,
"id": "31kxpds7y5rgj0ch0g6rjqe0rr",
"input": {
"inp": "Do Not Kule Oi't hy.er-l'rieed AjijqIi: imac - Analyst (fteuiers) Hcuiers - A | ) | ilf, <;/) in |) nter |iic . conic! deeiilf. l.o sell n lower-|)rieofl wersinn oi its Macintosh cornutor to nttinct ronsnnu-rs already euami'red ot its iPod music jiayo-r untl annoyoil. by sccnrit.y problems ivitJi Willtlows PCs , Piper.iaffray analyst. (Jcne Muster <aid on Tlinrtiday.",
"top_k": 50,
"top_p": 1,
"do_sample": false,
"instruction": "You are an assistant that takes a piece of text that has been corrupted during OCR digitisation, and produce a corrected version of the same text.",
"temperature": 1,
"max_new_tokens": 5000,
"repetition_penalty": 1
},
"logs": "The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.\nSetting `pad_token_id` to `eos_token_id`:128001 for open-end generation.",
"metrics": {
"predict_time": 10.291428474,
"total_time": 102.738059
},
"output": "\nDo Not Rule Out Apple iPod-Mac Tie-Up: Analyst (Reuters) Reuters - A Piper Jaffray analyst said on Thursday he does not rule out Apple Computer Inc. selling a lower-priced version of its Macintosh computer to attract consumers already enamored of its iPod music player and annoyed by security problems with Windows PCs.",
"started_at": "2024-07-30T14:32:29.199630Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/31kxpds7y5rgj0ch0g6rjqe0rr",
"cancel": "https://api.replicate.com/v1/predictions/31kxpds7y5rgj0ch0g6rjqe0rr/cancel"
},
"version": "29999d2d565129e1efb93fd6deaf088bf58ce05f98c6e1f61c0d514ec10de32d"
}
The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Setting `pad_token_id` to `eos_token_id`:128001 for open-end generation.