Safetensors
gpt2

Add pipeline tag and repository links

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +20 -7
README.md CHANGED
@@ -1,19 +1,26 @@
1
  ---
2
- license: mit
3
  base_model:
4
  - openai-community/gpt2
 
 
 
5
  ---
 
6
  # COCONUT Model
7
 
8
  <div align="center">
9
 
10
  [![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-Model-fcc21b?style=for-the-badge&logo=huggingface&logoColor=white)](https://huggingface.co/ModalityDance/latent-tts-coconut)
 
 
11
 
12
  </div>
13
 
14
  ## Overview
15
 
16
- **COCONUT** (Chain of Continuous Thought) is a latent reasoning model based on GPT-2 that enables continuous thought generation in latent space. This model is part of the [Parallel Test-Time Scaling for Latent Reasoning Models](https://arxiv.org/abs/2510.07745) framework.
 
 
17
 
18
  ## Model Details
19
 
@@ -40,6 +47,8 @@ huggingface-cli download ModalityDance/latent-tts-coconut --local-dir checkpoint
40
 
41
  ### Basic Usage
42
 
 
 
43
  ```python
44
  from transformers import AutoTokenizer
45
  from src.generation_mixin import LatentGenerationMixin, LatentGenerationConfig
@@ -71,7 +80,8 @@ model = LatentCOCONUT.from_pretrained(
71
  )
72
 
73
  # Prepare input (note: newline before <|start-latent|>)
74
- question = "What is 2 + 2?\n<|start-latent|>"
 
75
  inputs = tokenizer(question, return_tensors="pt").to(model.device)
76
 
77
  # Configure generation
@@ -104,9 +114,12 @@ The model fully supports batch processing:
104
  ```python
105
  # Prepare batch inputs
106
  questions = [
107
- "What is 2 + 2?\n<|start-latent|>",
108
- "What is 5 * 3?\n<|start-latent|>",
109
- "What is 10 - 4?\n<|start-latent|>",
 
 
 
110
  ]
111
  inputs = tokenizer(questions, return_tensors="pt", padding=True).to(model.device)
112
 
@@ -169,7 +182,7 @@ print(f"Answer: {answer}")
169
 
170
  ## Evaluation
171
 
172
- Run evaluation using the provided scripts:
173
 
174
  ```bash
175
  # For COCONUT (GPT-2 based models)
 
1
  ---
 
2
  base_model:
3
  - openai-community/gpt2
4
+ license: mit
5
+ pipeline_tag: text-generation
6
+ library_name: transformers
7
  ---
8
+
9
  # COCONUT Model
10
 
11
  <div align="center">
12
 
13
  [![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-Model-fcc21b?style=for-the-badge&logo=huggingface&logoColor=white)](https://huggingface.co/ModalityDance/latent-tts-coconut)
14
+ [![Paper](https://img.shields.io/badge/Paper-arXiv-b31b1b?style=for-the-badge&logo=arxiv)](https://arxiv.org/abs/2510.07745)
15
+ [![GitHub](https://img.shields.io/badge/GitHub-Code-blue?style=for-the-badge&logo=github)](https://github.com/ModalityDance/LatentTTS)
16
 
17
  </div>
18
 
19
  ## Overview
20
 
21
+ **COCONUT** (Chain of Continuous Thought) is a latent reasoning model based on GPT-2 that enables continuous thought generation in latent space. This model is part of the research presented in the paper [Parallel Test-Time Scaling for Latent Reasoning Models](https://huggingface.co/papers/2510.07745).
22
+
23
+ Official Code: [https://github.com/ModalityDance/LatentTTS](https://github.com/ModalityDance/LatentTTS)
24
 
25
  ## Model Details
26
 
 
47
 
48
  ### Basic Usage
49
 
50
+ Note: Inference requires the `src` directory and custom implementation files from the [official GitHub repository](https://github.com/ModalityDance/LatentTTS).
51
+
52
  ```python
53
  from transformers import AutoTokenizer
54
  from src.generation_mixin import LatentGenerationMixin, LatentGenerationConfig
 
80
  )
81
 
82
  # Prepare input (note: newline before <|start-latent|>)
83
+ question = "What is 2 + 2?
84
+ <|start-latent|>"
85
  inputs = tokenizer(question, return_tensors="pt").to(model.device)
86
 
87
  # Configure generation
 
114
  ```python
115
  # Prepare batch inputs
116
  questions = [
117
+ "What is 2 + 2?
118
+ <|start-latent|>",
119
+ "What is 5 * 3?
120
+ <|start-latent|>",
121
+ "What is 10 - 4?
122
+ <|start-latent|>",
123
  ]
124
  inputs = tokenizer(questions, return_tensors="pt", padding=True).to(model.device)
125
 
 
182
 
183
  ## Evaluation
184
 
185
+ Run evaluation using the provided scripts in the official repository:
186
 
187
  ```bash
188
  # For COCONUT (GPT-2 based models)