```python
from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence"]

model = SentenceTransformer('model_name')
embeddings = model.encode(sentences)
print(embeddings)
```


## Usage (HuggingFace Transformers)


```python
from transformers import AutoTokenizer, AutoModel
import torch

#Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    sum_embeddings = torch.sum(token_embeddings * input_mask_expanded, 1)
    sum_mask = torch.clamp(input_mask_expanded.sum(1), min=1e-9)
    return sum_embeddings / sum_mask

# Sentences we want sentence embeddings for
sentences = ['This is an example sentence']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('model_name')
model = AutoModel.from_pretrained('model_name')

# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, max_length=128, return_tensors='pt')

# Compute token embeddings
with torch.no_grad():
    model_output = model(**encoded_input)

# Perform pooling. In this case, max pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

print("Sentence embeddings:")
print(sentence_embeddings)
```


## Training Procedure


<!--- Describe how your model was trained -->


## Evaluation Results


<!--- Describe how your model was evaluated -->


## Citing & Authors


<!--- Describe where people can find more information -->


model name: my_new_model


model author: osanseviero


task: feature-extraction


tags: pytorch, roberta, feature-extraction, sentence-transformers, infinity_compatible


tags:


- spacy
- token-classification
language:
- en
model-index:
- name: fashion_brands_patterns
results:
  - task:
name: NER
type: token-classification
metrics:
    - name: NER Precision
type: precision
value: 0.0
    - name: NER Recall
type: recall
value: 0.0
    - name: NER F Score
type: f_score
value: 0.0


| Feature | Description |
| --- | --- |
| **Name** | `en_ner_fashion` |
| **Version** | `0.0.0` |
| **spaCy** | `>=3.1.0,<3.2.0` |
| **Default Pipeline** | `tok2vec`, `ner` |
| **Components** | `tok2vec`, `ner` |
| **Vectors** | 0 keys, 0 unique vectors (0 dimensions) |
| **Sources** | n/a |
| **License** | n/a |
| **Author** | [n/a]() |


### Label Scheme


<details>


<summary>View label scheme (1 labels for 1 components)</summary>


| Component | Labels |
| --- | --- |
| **`ner`** | `FASHION_BRAND` |


</details>


### Accuracy


| Type | Score |
| --- | --- |
| `ENTS_F` | 0.00 |
| `ENTS_P` | 0.00 |
| `ENTS_R` | 0.00 |
| `TOK2VEC_LOSS` | 1043.55 |
| `NER_LOSS` | 1414323.43 |


model name: fashion_brands_patterns


task: token-classification


tags: en, spacy, token-classification, model-index


library_name: generic
language:


- en
pipeline_tag: text-to-image


## Fork of DALL·E mini - Generate images from text


For the original repo, head to https://huggingface.co/flax-community/dalle-mini


model name: dalle-mini-fork


model author: osanseviero


task: text-to-image


tags: jax, bart, text2text-generation, en, generic, text-to-image


tags:


- sentence-transformers
- sentence-similarity


## Testing Sentence Transformer


model name: full-sentence-distillroberta2


task: feature-extraction


tags: pytorch, jax, roberta, feature-extraction, sentence-transformers, sentence-similarity, infinity_compatible


- automatic-speech-recognition
library_name: generic


# pyctcdecode + Hugging Face model


Inspired on https://github.com/kensho-technologies/pyctcdecode/blob/main/tutorials/02_pipeline_huggingface.ipynb


model name: pyctcdecode_asr


task: automatic-speech-recognition


tags: pytorch, tf, wav2vec2, automatic-speech-recognition, generic


- image-classification
library_name: generic


# Dog vs Cat Image Classification with FastAI CNN


Training is based in FastAI [Quick Start](https://docs.fast.ai/quick_start.html). Example training


## Training


The model was trained as follows


```python
path = untar_data(URLs.PETS)/'images'

def is_cat(x): return x[0].isupper()
dls = ImageDataLoaders.from_name_func(
    path, get_image_files(path), valid_pct=0.2, seed=42,
    label_func=is_cat, item_tfms=Resize(224))

learn = cnn_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(1)
```


model name: fastai_cat_vs_dog_fork2


model author: osanseviero


task: image-classification


tags: generic, image-classification


tags:


- spacy
- token-classification
language:
- de
license: cc-by-sa-4.0
model-index:
- name: de_udv25_germanhdt_trf
results:
  - task:
name: TAG
type: token-classification
metrics:
    - name: TAG (XPOS) Accuracy
type: accuracy
value: 0.9783706437
  - task:
name: POS
type: token-classification
metrics:
    - name: POS (UPOS) Accuracy
type: accuracy
value: 0.9782287343
  - task:
name: MORPH
type: token-classification
metrics:
    - name: Morph (UFeats) Accuracy
type: accuracy
value: 0.7811165904
  - task:
name: LEMMA
type: token-classification
metrics:
    - name: Lemma Accuracy
type: accuracy
value: 0.9204479606
  - task:
name: UNLABELED_DEPENDENCIES
type: token-classification
metrics:
    - name: Unlabeled Attachment Score (UAS)
type: f_score
value: 0.9728029281
  - task:
name: LABELED_DEPENDENCIES
type: token-classification
metrics:
    - name: Labeled Attachment Score (LAS)
type: f_score
value: 0.9588036494
  - task:
name: SENTS
type: token-classification
metrics:
    - name: Sentences F-Score
type: f_score
value: 0.99750025


UD v2.5 benchmarking pipeline for UD_German-HDT


| Feature | Description |
| --- | --- |
| **Name** | `de_udv25_germanhdt_trf` |
| **Version** | `0.0.1` |
| **spaCy** | `>=3.2.1,<3.3.0` |
| **Default Pipeline** | `experimental_char_ner_tokenizer`, `transformer`, `tagger`, `morphologizer`, `parser`, `experimental_edit_tree_lemmatizer` |
| **Components** | `experimental_char_ner_tokenizer`, `transformer`, `senter`, `tagger`, `morphologizer`, `parser`, `experimental_edit_tree_lemmatizer` |
| **Vectors** | 0 keys, 0 unique vectors (0 dimensions) |
| **Sources** | [Universal Dependencies v2.5](https://lindat.mff.cuni.cz/repository/xmlui/handle/11234/1-3105) (Zeman, Daniel; et al.) |
| **License** | `CC BY-SA 4.0` |
| **Author** | [Explosion](https://explosion.ai) |


### Label Scheme


<details>


<summary>View label scheme (62832 labels for 6 components)</summary>