huggingface / huggingface/diffusers

[Bug] ChatGLMTokenizer special token property getters and setters are broken

Aperta Adatta ai principianti
#14,291 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
34.5k
Fork
7.3k
Merge medio
3g 3h
PR unite (30g)
91

Descrizione

### Describe the bug

In `ChatGLMTokenizer` (`src/diffusers/pipelines/kolors/tokenizer.py`), the property getters for `pad_token`, `unk_token`, and `eos_token` hardcode return values (e.g. `pad_token` returns `""` instead of `""`). Furthermore, assigning new special token values (e.g. `tokenizer.pad_token = ""`) has no effect on the property getter because the custom setters update private attributes (`_pad_token`) while the getters ignore them or use hardcoded strings.

### Reproduction

```python
from diffusers.pipelines.kolors import ChatGLMTokenizer

# Instantiating ChatGLMTokenizer or viewing properties
# tokenizer.pad_token returns '' instead of ''
# Setting tokenizer.pad_token = '' does not update tokenizer.pad_token
```

### System Info

- Diffusers version: 0.36.0.dev0
- Python version: 3.11
- PyTorch version: 2.x

### Who can help?

@yiyixuxu @asomoza @DN6

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Open src/diffusers/pipelines/kolors/tokenizer.py and inspect ChatGLMTokenizer's pad_token, unk_token, and eos_token properties. Reproduce the reported default values and assignments such as tokenizer.pad_token = "". Done means the getters return the correct defaults and reflect values assigned through their setters.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, pytorch
Ambito
machine-learning
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
84/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.