bigscience-workshop/petals

The prompt tuning example (prompt-tuning-sst2) don't work

Open

#241 geöffnet am 29. Jan. 2023

Auf GitHub ansehen
 (14 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (424 Forks)batch import
help wanted

Repository-Metriken

Stars
 (8.248 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi, I have tried to run the notebook example you have published (without editing) in colab but it doesn't work... I get the following error:

RuntimeError                              Traceback (most recent call last)
[<ipython-input-12-7f7d7fa267e9>](https://localhost:8080/#) in <module>
     17 
     18         model.train()
---> 19         outputs = model(**batch)
     20         loss = outputs.loss
     21         loss.backward()

3 frames
[/usr/local/lib/python3.8/dist-packages/torch/nn/modules/linear.py](https://localhost:8080/#) in forward(self, input)
    112 
    113     def forward(self, input: Tensor) -> Tensor:
--> 114         return F.linear(input, self.weight, self.bias)
    115 
    116     def extra_repr(self) -> str:

RuntimeError: expected scalar type Half but found Float

It is probably about the transformers version out of date but petals 1.1.1 requires transformers==4.25.1

Contributor Guide