Improve model card: add metadata and links to paper/code

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +13 -9
README.md CHANGED
@@ -1,16 +1,20 @@
1
-
2
  ---
 
 
3
  license: mit
4
- language: en
 
5
  ---
6
 
7
  # Smoothie: A Diffusion Model for Paraphrase Generation
8
 
9
  [![Generic badge](https://img.shields.io/badge/Model-Custom_Smoothie-blue.svg)](https://shields.io/)
10
  [![Generic badge](https://img.shields.io/badge/Dataset-QQP-green.svg)](https://huggingface.co/datasets/glue)
11
- [![Generic badge](https://img.shields.io/badge/Paper-arXiv:2505.18853v1-red.svg)](https://arxiv.org/abs/2505.18853)
 
 
12
 
13
- This repository contains a diffusion-based model for text generation, trained on the **Quora Question Pairs (QQP)** dataset for the task of **paraphrasing**. The architecture and training methodology are based on the paper *Smoothie: Smoothing Diffusion on Token Embeddings for Text Generation*.
14
 
15
  This is a custom model and **requires `trust_remote_code=True`** to load, as the model's architecture is defined in the accompanying `modeling_smoothie.py` file.
16
 
@@ -125,7 +129,8 @@ tokenizer = AutoTokenizer.from_pretrained(repo_id)
125
  # `trust_remote_code=True` is essential to load the custom SmoothieModel architecture
126
  model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).to(device)
127
  model.eval()
128
- print("\nModel loaded successfully from the Hub!")
 
129
 
130
  # --- Prepare Diffusion Components ---
131
  print("Preparing the embedding matrix for the diffusion process...")
@@ -144,7 +149,8 @@ print("Diffusion components are ready.")
144
 
145
  # --- Run Inference ---
146
  source_question = "How can I become a better writer?"
147
- print(f"\nSource Question: {source_question}")
 
148
 
149
  inputs = tokenizer(
150
  source_question,
@@ -191,6 +197,4 @@ This model was trained from scratch.
191
 
192
  - The model's knowledge is limited to the topics present in the Quora Questions dataset. It may perform poorly on highly specialized or out-of-domain topics.
193
  - As with any model trained on large-scale internet text, it may reflect societal biases present in the training data.
194
- - The model is currently undertrained and may not always produce semantically perfect paraphrases. Continued training would improve its accuracy.
195
-
196
- ```
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: mit
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
  ---
8
 
9
  # Smoothie: A Diffusion Model for Paraphrase Generation
10
 
11
  [![Generic badge](https://img.shields.io/badge/Model-Custom_Smoothie-blue.svg)](https://shields.io/)
12
  [![Generic badge](https://img.shields.io/badge/Dataset-QQP-green.svg)](https://huggingface.co/datasets/glue)
13
+ [![Generic badge](https://img.shields.io/badge/Paper-arXiv:2505.18853-red.svg)](https://huggingface.co/papers/2505.18853)
14
+
15
+ This repository contains a diffusion-based model for text generation, trained on the **Quora Question Pairs (QQP)** dataset for the task of **paraphrasing**. The architecture and training methodology are based on the paper [Smoothie: Smoothing Diffusion on Token Embeddings for Text Generation](https://huggingface.co/papers/2505.18853).
16
 
17
+ The official code is available at [ashaba1in/smoothie](https://github.com/ashaba1in/smoothie).
18
 
19
  This is a custom model and **requires `trust_remote_code=True`** to load, as the model's architecture is defined in the accompanying `modeling_smoothie.py` file.
20
 
 
129
  # `trust_remote_code=True` is essential to load the custom SmoothieModel architecture
130
  model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).to(device)
131
  model.eval()
132
+ print("
133
+ Model loaded successfully from the Hub!")
134
 
135
  # --- Prepare Diffusion Components ---
136
  print("Preparing the embedding matrix for the diffusion process...")
 
149
 
150
  # --- Run Inference ---
151
  source_question = "How can I become a better writer?"
152
+ print(f"
153
+ Source Question: {source_question}")
154
 
155
  inputs = tokenizer(
156
  source_question,
 
197
 
198
  - The model's knowledge is limited to the topics present in the Quora Questions dataset. It may perform poorly on highly specialized or out-of-domain topics.
199
  - As with any model trained on large-scale internet text, it may reflect societal biases present in the training data.
200
+ - The model is currently undertrained and may not always produce semantically perfect paraphrases. Continued training would improve its accuracy.