andrea-gentilini's picture
Update README.md
91232b9 verified
|
Raw History Blame Contribute Delete
1.16 kB
metadata
library_name: zip2zip
license: mit
pipeline_tag: text-generation
base_model: microsoft/Phi-3-medium-4k-instruct
tags:
  - zip2zip
  - zip2zip++
  - adaptive-tokenization

zip2zip-pp-Phi-3-medium-4k-instruct

Zip2Zip++ checkpoint based on microsoft/Phi-3-medium-4k-instruct (training step 8000). The repository keeps the original training checkpoint on main and the user-facing, self-contained inference export on hf.

Usage

pip install "zip2zip>=0.2.0"
from zip2zip import Zip2ZipModel, Zip2ZipTokenizer

repo_id = "epfl-dlab/zip2zip-pp-Phi-3-medium-4k-instruct"
tokenizer = Zip2ZipTokenizer.from_pretrained(
    repo_id, revision="hf"
)
model = Zip2ZipModel.from_pretrained(
    repo_id, revision="hf", device_map="auto", dtype="auto"
)
inputs = tokenizer("Hello", return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Use main only with zip2zip-plus-plus when resuming training or reproducing the export. It is not a Transformers/zip2zip inference revision.