File size: 1,612 Bytes
1cbdc41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
library_name: transformers.js
pipeline_tag: text-generation
license: apache-2.0
base_model: utter-project/EuroLLM-1.7B-Instruct
tags:
- transformers.js
- onnx
- llama
- conversational
- text-generation
---

# EuroLLM-1.7B-Instruct-ONNX

This repository contains ONNX weights for [`utter-project/EuroLLM-1.7B-Instruct`](https://huggingface.co/utter-project/EuroLLM-1.7B-Instruct)
prepared for use with Transformers.js.

Available dtypes in this export: `fp32, q4, q8`.

The repository layout follows the standard Transformers.js convention:

- tokenizer and config files in the repository root
- ONNX model files inside `onnx/`

## Usage (Transformers.js)

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

const generator = await pipeline("text-generation", "EuroLLM-1.7B-Instruct-ONNX", {
  device: "webgpu",
  dtype: "fp16", // or "fp32", "q4", "q8"
});

const messages = [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Schreibe einen kurzen Satz auf Deutsch." },
];

const output = await generator(messages, { max_new_tokens: 64 });
console.log(output[0].generated_text.at(-1).content);
```

Recommended choices:

- `fp32`: highest precision, typically for WebGPU
- `fp16`: smaller WebGPU model with good speed/quality tradeoff
- `q8`: smaller CPU/WASM model
- `q4`: smallest model, best for constrained devices

## Source Model

- Base model: [`utter-project/EuroLLM-1.7B-Instruct`](https://huggingface.co/utter-project/EuroLLM-1.7B-Instruct)
- Export format: ONNX
- Intended runtime: [Transformers.js](https://huggingface.co/docs/transformers.js)