allenai / allenai/unified-io-2.pytorch
How to reproduce the results?
- Langage dominant
- Python
- Étoiles
- 78
- Forks
- 8
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I run the scripts like:
```
from uio2.model import UnifiedIOModel
from uio2.runner import TaskRunner
from uio2.preprocessing import UnifiedIOPreprocessor
from uio2.preprocessing import build_batch
model = UnifiedIOModel.from_pretrained("allenai/uio2-XXL")
preprocessor = UnifiedIOPreprocessor.from_pretrained("/allenai/uio2-preprocessor", tokenizer="./tokenizer.model")
model.set_modalities(input_modalities=["text"], target_modalities=["text"])
preprocessed_example = preprocessor(text_inputs="What color is the sky?", target_modality="text")
batch = build_batch([preprocessed_example], device=model.device)
tokens = model.generate(batch, modality="text", max_new_tokens=128)
print(tokens)
```
The results:
ps: I transfer .bin to .safetensors, since `UnifiedIOModel.from_pretrained` only support safetensors, while the model in huggingface is in .bin form. Maybe there is mistake when I transfer the model. Can you release your safetensors model? Thanks a lot
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.