https://huggingface.co/PleIAs/Pleias-Nano with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Text generation with onnx-community/Pleias-Nano.

import { pipeline } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline("text-generation", "onnx-community/Pleias-Nano", { dtype: "q4" });

// Construct RAG prompt
const prompt = `
<|query_start|>Is Wikipedia reliable?<|query_end|>
<|source_start|><|source_id_start|>ebea70a3502acfbd<|source_id_end|>Articles for traditional encyclopedias such as Encyclopædia Britannica are written by experts, lending such encyclopedias a reputation for accuracy.[144] However, a peer review in 2005 of forty-two scientific entries on both Wikipedia and Encyclopædia Britannica by the science journal Nature found few differences in accuracy, and concluded that "the average science entry in Wikipedia contained around four inaccuracies; Britannica, about three."[145] Joseph Reagle suggested that while the study reflects "a topical strength of Wikipedia contributors" in science articles, "Wikipedia may not have fared so well using a random sampling of articles or on humanities subjects."<|source_end|>
<|source_start|><|source_id_start|>5f862e733d38288e<|source_id_end|>As a consequence of the open structure, Wikipedia "makes no guarantee of validity" of its content, since no one is ultimately responsible for any claims appearing in it.[W 54] Concerns have been raised by PC World in 2009 regarding the lack of accountability that results from users' anonymity, the insertion of false information,[152] vandalism, and similar problems. Legal Research in a Nutshell (2011), cites Wikipedia as a "general source" that "can be a real boon" in "coming up to speed in the law governing a situation" and, "while not authoritative, can provide basic facts as well as leads to more in-depth resources".<|source_end|>
<|source_start|><|source_id_start|>354fa4908152b336<|source_id_end|>Wikipedia's open structure inherently makes it an easy target for Internet trolls, spammers, and various forms of paid advocacy seen as counterproductive to the maintenance of a neutral and verifiable online encyclopedia.[70][W 55] In response to paid advocacy editing and undisclosed editing issues, Wikipedia was reported in an article in The Wall Street Journal to have strengthened its rules and laws against undisclosed editing.[162] The article stated that: "Beginning Monday [from the date of the article, June 16, 2014], changes in Wikipedia's terms of use will require anyone paid to edit articles to disclose that arrangement. Katherine Maher, the nonprofit Wikimedia Foundation's chief communications officer, said the changes address a sentiment among volunteer editors that 'we're not an advertising service; we're an encyclopedia.'"<|source_end|>
<|source_analysis_start|>
`.trim();

// Generate a response
const output = await generator(prompt, { max_new_tokens: 1024, do_sample: false, return_full_text: false });
console.log(output[0].generated_text);
Example output
The user is asking for information on how Wikipedia articles are verified. The provided references include a variety of sources that discuss different aspects of Wikipedia's reliability, including its coverage, the quality of articles, and the methods used to verify information. The most relevant references for answering this query are **ebea70a3502acfbd**, which provides a direct assessment of the accuracy of Wikipedia articles, and **5f862e733d38288e**, which discusses the lack of accountability and the potential for false information. Other references, such as **d0d0d0d0d0d0d0d0** and **354fa4908152b336**, provide context on the structure and reliability of Wikipedia but are less directly related to verification.
Wikipedia articles are generally considered to be reliable due to several factors that contribute to their trustworthiness. Firstly, Wikipedia's open structure allows it to be a "general source" that can provide basic facts as well as leads to more in-depth resources<ref name="5f862e733d38288e">"Concerns have been raised by PC World in 2009 regarding the lack of accountability that results from users' anonymity, the insertion of false information, vandalism, and similar problems."</ref>. This makes it a valuable resource for those seeking to understand complex topics.

In terms of accuracy, Wikipedia has been praised for its "open structure," which allows it to be a "general source" that can provide basic facts as well as leads to more in-depth resources<ref name="5f862e733d38288e">"Concerns have been raised by PC World in 2009 regarding the lack of accountability that results from users' anonymity, the insertion of false information, vandalism, and similar problems."</ref>. This openness is seen as a significant advantage, allowing readers to engage with the content more deeply and make informed decisions.

However, there are still some areas where Wikipedia's reliability can be improved. For instance, there have been concerns about the accuracy of entries on subjects such as science, where "a peer review in 2005 of forty-two scientific entries on both Wikipedia and Encyclopædia Britannica by the science journal Nature found few differences in accuracy"<ref name="ebea70a3502acfbd">"a peer review in 2005 of forty-two scientific entries on both Wikipedia and Encyclopædia Britannica by the science journal Nature found few differences in accuracy"</ref>. This suggests that while Wikipedia is generally considered to be a reliable source, there is still room for improvement in terms of accuracy.

Additionally, there have been instances where articles have been found to contain inaccuracies, such as "a peer review in 2005 of forty-two scientific entries on both Wikipedia and Encyclopædia Britannica by the science journal Nature found few differences in accuracy"<ref name="ebea70a3502acfbd">"a peer review in 2005 of forty-two scientific entries on both Wikipedia and Encyclopædia Britannica by the science journal Nature found few differences in accuracy"</ref>. This highlights the ongoing challenge of ensuring the highest possible level of accuracy in Wikipedia articles.

Overall, while Wikipedia articles are generally considered to be reliable, there is still room for improvement in terms of accuracy. This improvement could involve refining the structure of the articles, enhancing the quality of the information, and ensuring that the articles are updated regularly.

Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Downloads last month
22
Inference Examples
Inference API (serverless) does not yet support transformers.js models for this pipeline type.

Model tree for onnx-community/Pleias-Nano

Base model

PleIAs/Pleias-Nano
Quantized
(2)
this model