Update README.md
Browse files
README.md
CHANGED
@@ -5,4 +5,59 @@ base_model: PleIAs/Pleias-Pico
|
|
5 |
|
6 |
https://huggingface.co/PleIAs/Pleias-Pico with ONNX weights to be compatible with Transformers.js.
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
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](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|
|
|
5 |
|
6 |
https://huggingface.co/PleIAs/Pleias-Pico with ONNX weights to be compatible with Transformers.js.
|
7 |
|
8 |
+
## Usage (Transformers.js)
|
9 |
+
|
10 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
11 |
+
```bash
|
12 |
+
npm i @huggingface/transformers
|
13 |
+
```
|
14 |
+
|
15 |
+
**Example:** Text generation with `onnx-community/Pleias-Pico`.
|
16 |
+
|
17 |
+
```js
|
18 |
+
import { pipeline } from "@huggingface/transformers";
|
19 |
+
|
20 |
+
// Create a text generation pipeline
|
21 |
+
const generator = await pipeline("text-generation", "onnx-community/Pleias-Pico", { dtype: "q8" });
|
22 |
+
|
23 |
+
// Construct RAG prompt
|
24 |
+
const prompt = `
|
25 |
+
<|query_start|>Is Wikipedia reliable?<|query_end|>
|
26 |
+
<|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|>
|
27 |
+
<|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|>
|
28 |
+
<|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|>
|
29 |
+
<|source_analysis_start|>
|
30 |
+
`.trim();
|
31 |
+
|
32 |
+
// Generate a response
|
33 |
+
const output = await generator(prompt, { max_new_tokens: 1024, do_sample: false, return_full_text: false });
|
34 |
+
console.log(output[0].generated_text);
|
35 |
+
```
|
36 |
+
|
37 |
+
<details>
|
38 |
+
|
39 |
+
<summary>Example output</summary>
|
40 |
+
|
41 |
+
```
|
42 |
+
The user is asking about the reliability of Wikipedia's content, specifically in relation to its accuracy and the potential for future changes. They are concerned about whether the current system is reliable and whether there are any signs of improvement. The references provided include a detailed analysis of Wikipedia's reliability, the impact of peer review, and the potential for future improvements.
|
43 |
+
|
44 |
+
The most relevant references for answering this query are:
|
45 |
+
1. **ebea70a3502acfbd**: This reference provides a detailed analysis of the reliability of Wikipedia, including specific studies and criticisms.
|
46 |
+
2. **5f862e733d38288e**: This reference discusses the importance of transparency and the potential for future improvements in Wikipedia's content.
|
47 |
+
3. **354fa4908152b336**: This reference highlights the efforts of Wikipedia to strengthen its rules and the potential for future changes.
|
48 |
+
Wikipedia's reliability is a critical aspect of its content, and it is essential for maintaining the trust of users. According to a recent study, the reliability of Wikipedia is "the most reliable source of information" for the United States, with a high level of accuracy<ref name="ebea70a3502acfbd">"The most reliable source of information for the United States is Wikipedia, with a high level of accuracy."</ref>. This reliability is supported by the fact that "Wikipedia is the most reliable source of information for the United States"<ref name="ebea70a3502acfbd">"Wikipedia is the most reliable source of information for the United States."</ref>.
|
49 |
+
|
50 |
+
However, there are several factors that can affect the reliability of Wikipedia. One significant concern is the lack of transparency and the potential for future improvements. As noted, "the average science entry in Wikipedia contains around four inaccuracies"<ref name="ebea70a3502acfbd">"the average science entry in Wikipedia contains around four inaccuracies"</ref>. This suggests that while the content is reliable, there may be room for improvement, particularly regarding the handling of inaccuracies.
|
51 |
+
|
52 |
+
Additionally, the structure of Wikipedia itself, which is open-access, has been criticized for its lack of accountability. The article "5f862e733d38288e" highlights that "no one is ultimately responsible for any claims appearing in it"<ref name="5f862e733d38288e">"no one is ultimately responsible for any claims appearing in it"</ref>. This indicates that the content is not entirely reliable, which could lead to further scrutiny and potential changes.
|
53 |
+
|
54 |
+
Furthermore, the efforts of Wikipedia to strengthen its rules and the transparency surrounding them have been noted. For example, the article in The Wall Street Journal has emphasized the importance of transparency and the potential for future changes in the rules governing Wikipedia<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>.
|
55 |
+
|
56 |
+
In conclusion, while Wikipedia is a reliable source of information, there are several factors that can affect its reliability, including the lack of transparency, the lack of accountability, and the need for further improvements in the rules and transparency. Future improvements, such as transparency and the establishment of new rules, are being considered to enhance the reliability of Wikipedia.
|
57 |
+
```
|
58 |
+
</details>
|
59 |
+
|
60 |
+
|
61 |
+
---
|
62 |
+
|
63 |
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](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|