Skip to content

Commit 1091fb3

Browse files
Merge pull request #3 from philipithomas/philipithomas/maintenance
Maintenance: Browser compatibility, docs updates
2 parents a6cf38c + 2327c29 commit 1091fb3

File tree

10 files changed

+363
-407
lines changed

10 files changed

+363
-407
lines changed

.github/workflows/documentation.yml

-20
This file was deleted.

.github/workflows/gh-pages.yml

-61
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ node_modules
1010

1111
# Do not track coverage reports
1212
/coverage
13+
.npmrc

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p align="center">
44
<br/>
5-
<picture>
5+
<picture>
66
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/Xenova/transformers.js-docs/raw/main/transformersjs-dark.svg" width="500" style="max-width: 100%;">
77
<source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/Xenova/transformers.js-docs/raw/main/transformersjs-light.svg" width="500" style="max-width: 100%;">
88
<img alt="transformers.js javascript library logo" src="https://huggingface.co/datasets/Xenova/transformers.js-docs/raw/main/transformersjs-light.svg" width="500" style="max-width: 100%;">
@@ -11,14 +11,14 @@
1111
</p>
1212

1313
<p align="center">
14-
<a href="https://www.npmjs.com/package/@xenova/transformers">
15-
<img alt="NPM" src="https://img.shields.io/npm/v/@xenova/transformers">
14+
<a href="https://www.npmjs.com/package/chromadb-default-embed">
15+
<img alt="NPM" src="https://img.shields.io/npm/v/chromadb-default-embed">
1616
</a>
17-
<a href="https://www.npmjs.com/package/@xenova/transformers">
18-
<img alt="NPM Downloads" src="https://img.shields.io/npm/dw/@xenova/transformers">
17+
<a href="https://www.npmjs.com/package/chromadb-default-embed">
18+
<img alt="NPM Downloads" src="https://img.shields.io/npm/dw/chromadb-default-embed">
1919
</a>
20-
<a href="https://www.jsdelivr.com/package/npm/@xenova/transformers">
21-
<img alt="jsDelivr Hits" src="https://img.shields.io/jsdelivr/npm/hw/@xenova/transformers">
20+
<a href="https://www.jsdelivr.com/package/npm/chromadb-default-embed">
21+
<img alt="jsDelivr Hits" src="https://img.shields.io/jsdelivr/npm/hw/chromadb-default-embed">
2222
</a>
2323
<a href="https://github.com/xenova/transformers.js/blob/main/LICENSE">
2424
<img alt="License" src="https://img.shields.io/github/license/xenova/transformers.js?color=blue">
@@ -38,7 +38,7 @@ Transformers.js is designed to be functionally equivalent to Hugging Face's [tra
3838
- 🗣️ **Audio**: automatic speech recognition and audio classification.
3939
- 🐙 **Multimodal**: zero-shot image classification.
4040

41-
Transformers.js uses [ONNX Runtime](https://onnxruntime.ai/) to run models in the browser. The best part about it, is that you can easily [convert](#convert-your-models-to-onnx) your pretrained PyTorch, TensorFlow, or JAX models to ONNX using [🤗 Optimum](https://github.com/huggingface/optimum#onnx--onnx-runtime).
41+
Transformers.js uses [ONNX Runtime](https://onnxruntime.ai/) to run models in the browser. The best part about it, is that you can easily [convert](#convert-your-models-to-onnx) your pretrained PyTorch, TensorFlow, or JAX models to ONNX using [🤗 Optimum](https://github.com/huggingface/optimum#onnx--onnx-runtime).
4242

4343
For more information, check out the full [documentation](https://huggingface.co/docs/transformers.js).
4444

@@ -70,7 +70,7 @@ out = pipe('I love transformers!')
7070
<td>
7171

7272
```javascript
73-
import { pipeline } from '@xenova/transformers';
73+
import { pipeline } from 'chromadb-default-embed';
7474

7575
// Allocate a pipeline for sentiment-analysis
7676
let pipe = await pipeline('sentiment-analysis');
@@ -94,15 +94,15 @@ let pipe = await pipeline('sentiment-analysis', 'Xenova/bert-base-multilingual-u
9494
## Installation
9595

9696

97-
To install via [NPM](https://www.npmjs.com/package/@xenova/transformers), run:
97+
To install via [NPM](https://www.npmjs.com/package/chromadb-default-embed), run:
9898
```bash
99-
npm i @xenova/transformers
99+
npm i chromadb-default-embed
100100
```
101101

102102
Alternatively, you can use it in vanilla JS, without any bundler, by using a CDN or static hosting. For example, using [ES Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), you can import the library with:
103103
```html
104104
<script type="module">
105-
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.13.2';
105+
import { pipeline } from 'https://cdn.jsdelivr.net/npm/chromadb-default-embed@2.13.2';
106106
</script>
107107
```
108108

@@ -135,13 +135,13 @@ Check out the Transformers.js [template](https://huggingface.co/new-space?templa
135135

136136

137137

138-
By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/@xenova/transformers@2.13.2/dist/), which should work out-of-the-box. You can customize this as follows:
138+
By default, Transformers.js uses [hosted pretrained models](https://huggingface.co/models?library=transformers.js) and [precompiled WASM binaries](https://cdn.jsdelivr.net/npm/chromadb-default-embed@2.13.2/dist/), which should work out-of-the-box. You can customize this as follows:
139139

140140

141141
### Settings
142142

143143
```javascript
144-
import { env } from '@xenova/transformers';
144+
import { env } from 'chromadb-default-embed';
145145

146146
// Specify a custom location for models (defaults to '/models/').
147147
env.localModelPath = '/path/to/models/';

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chromadb-default-embed",
3-
"version": "2.13.3",
3+
"version": "2.14.0",
44
"description": "Chroma's fork of @xenova/transformers serving as our default embedding function",
55
"main": "./src/transformers.js",
66
"types": "./types/transformers.d.ts",

scripts/supported_models.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@
162162
# Token classification
163163
'token-classification': [
164164
'Jean-Baptiste/camembert-ner',
165-
'Jean-Baptiste/camembert-ner-with-dates',
165+
# 'Jean-Baptiste/camembert-ner-with-dates',
166166
'pythainlp/thainer-corpus-v2-base-model',
167-
'gilf/french-camembert-postag-model',
167+
# 'gilf/french-camembert-postag-model',
168168
],
169169

170170
# Masked language modelling
171171
'fill-mask': [
172172
'camembert-base',
173-
'airesearch/wangchanberta-base-att-spm-uncased',
173+
# 'airesearch/wangchanberta-base-att-spm-uncased',
174174
],
175175
},
176176
'clap': {
@@ -387,13 +387,13 @@
387387
'donut': { # NOTE: also a `vision-encoder-decoder`
388388
# Image-to-text
389389
'image-to-text': [
390-
'naver-clova-ix/donut-base-finetuned-cord-v2',
391-
'naver-clova-ix/donut-base-finetuned-zhtrainticket',
390+
#'naver-clova-ix/donut-base-finetuned-cord-v2',
391+
#'naver-clova-ix/donut-base-finetuned-zhtrainticket',
392392
],
393393

394394
# Document Question Answering
395395
'document-question-answering': [
396-
'naver-clova-ix/donut-base-finetuned-docvqa',
396+
# 'naver-clova-ix/donut-base-finetuned-docvqa',
397397
],
398398
},
399399
'dpt': {
@@ -575,9 +575,9 @@
575575
'mbart': {
576576
# Translation
577577
'translation': [
578-
'facebook/mbart-large-50-many-to-many-mmt',
579-
'facebook/mbart-large-50-many-to-one-mmt',
580-
'facebook/mbart-large-50',
578+
# 'facebook/mbart-large-50-many-to-many-mmt',
579+
#'facebook/mbart-large-50-many-to-one-mmt',
580+
# 'facebook/mbart-large-50',
581581
],
582582
},
583583
'mistral': {
@@ -632,7 +632,7 @@
632632
# Text-to-text
633633
'text2text-generation': [
634634
'google/mt5-small',
635-
'google/mt5-base',
635+
# 'google/mt5-base',
636636
],
637637
},
638638
'nougat': {
@@ -835,8 +835,8 @@
835835
('translation', 'summarization'): [
836836
't5-small',
837837
't5-base',
838-
'google/t5-v1_1-small',
839-
'google/t5-v1_1-base',
838+
# 'google/t5-v1_1-small',
839+
# 'google/t5-v1_1-base',
840840
'google/flan-t5-small',
841841
'google/flan-t5-base',
842842
],
@@ -873,7 +873,7 @@
873873
'trocr': { # NOTE: also a `vision-encoder-decoder`
874874
# Text-to-image
875875
'text-to-image': [
876-
'microsoft/trocr-small-printed',
876+
# 'microsoft/trocr-small-printed',
877877
'microsoft/trocr-base-printed',
878878
'microsoft/trocr-small-handwritten',
879879
'microsoft/trocr-base-handwritten',

0 commit comments

Comments
 (0)