https://huggingface.co./PleIAs/Pleias-Pico 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-Pico
.
import { pipeline } from "@huggingface/transformers";
// Create a text generation pipeline
const generator = await pipeline("text-generation", "onnx-community/Pleias-Pico", { dtype: "fp32" });
// 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 about the reliability of Wikipedia's content compared to other encyclopedias. The references provided include a variety of sources discussing Wikipedia's reliability, the impact of its structure, and the challenges faced by Wikipedia in maintaining its credibility.
**ebea70a3502acfbd** discusses the accuracy of Wikipedia's entries compared to other encyclopedias like Encyclopædia Britannica, noting that while some entries are accurate, others are not. It also highlights the issue of humanities subjects being overlooked in Wikipedia.
**5f862e733d38288e** addresses the lack of accountability and the potential for misinformation in Wikipedia, which can affect its credibility. It also mentions the importance of transparency and the need for Wikipedia to be open and verifiable.
**354fa4908152b336** provides context on the structure and content of Wikipedia, emphasizing its openness and the potential for abuse. It also mentions the legal and ethical concerns surrounding its content.
Wikipedia's reliability is a significant concern, as it is a widely recognized and trusted encyclopedia. However, its content can be subject to various forms of misinformation and human rights violations.
One major issue is the lack of accountability in Wikipedia. According to **5f862e733d38288e**, "Wikipedia may not have fared so well using a random sampling of articles or on humanities subjects" due to the lack of transparency and the potential for misinformation<ref name="5f862e733d38288e">"Wikipedia may not have fared so well using a random sampling of articles or on humanities subjects."</ref>. This suggests that while Wikipedia is a reliable source, it may not always provide accurate information about its content.
Another challenge is the potential for abuse. The structure of Wikipedia, as described in **354fa4908152b336**, includes provisions for paid editing and spamming, which can lead to misinformation and abuse<ref name="354fa4908152b336">"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."</ref>. This highlights the need for Wikipedia to be open and verifiable, as it can help maintain its credibility.
Additionally, the structure of Wikipedia itself, as outlined in **ebea70a3502acfbd**, emphasizes the importance of transparency and the need for Wikipedia to be open and verifiable<ref name="ebea70a3502acfbd">"Wikipedia may not have fared so well using a random sampling of articles or on humanities subjects."</ref>. This underscores the importance of maintaining a clear and verifiable content structure to ensure that Wikipedia remains a reliable source.
In summary, while Wikipedia is a reliable encyclopedia, its content can be subject to misinformation and human rights violations. The lack of transparency and the potential for abuse are significant concerns. Ensuring that Wikipedia remains open and verifiable is crucial for maintaining its credibility and ensuring that its content remains trustworthy.
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
- 41
Inference API (serverless) does not yet support transformers.js models for this pipeline type.
Model tree for onnx-community/Pleias-Pico
Base model
PleIAs/Pleias-Pico