Banaxi-Tech commited on
Commit
fcf84cc
·
verified ·
1 Parent(s): 7e64a35

Match model Transformers 5.19.0 and support TokenizersBackend

Browse files
Files changed (3) hide show
  1. README.md +3 -6
  2. app.py +1 -1
  3. requirements.txt +1 -1
README.md CHANGED
@@ -60,9 +60,6 @@ float32 and will be slow. Outside ZeroGPU, the `spaces.GPU` decorator has no eff
60
 
61
  ## Model compatibility
62
 
63
- Dependencies pin Transformers 4.57.6 and Gradio 5.49.1. The private model's code
64
- could not be inspected during scaffolding, so an authenticated end-to-end model
65
- run remains necessary. If its remote code requires a different Transformers
66
- version or additional packages, update `requirements.txt` to match the model's
67
- instructions. The repository must expose an `AutoModelForCausalLM` implementation
68
- with `generate()` and a tokenizer chat template.
 
60
 
61
  ## Model compatibility
62
 
63
+ Dependencies pin Transformers 5.19.0 to match the model configuration and support
64
+ its `TokenizersBackend` tokenizer, and Gradio 5.49.1. The model's custom
65
+ `AutoModelForCausalLM` implementation loads with `trust_remote_code=True`.
 
 
 
app.py CHANGED
@@ -141,7 +141,7 @@ def load_model():
141
  model = AutoModelForCausalLM.from_pretrained(
142
  MODEL_ID,
143
  **common,
144
- torch_dtype=torch.bfloat16 if device == "cuda" else torch.float32,
145
  ).to(device).eval()
146
  return ChatModel(tokenizer, model)
147
 
 
141
  model = AutoModelForCausalLM.from_pretrained(
142
  MODEL_ID,
143
  **common,
144
+ dtype=torch.bfloat16 if device == "cuda" else torch.float32,
145
  ).to(device).eval()
146
  return ChatModel(tokenizer, model)
147
 
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  spaces==0.51.3
2
  gradio==5.49.1
3
- transformers==4.57.6
4
  torch==2.8.0
5
  sentencepiece>=0.2.0,<0.3
6
  protobuf>=4.25,<7
 
1
  spaces==0.51.3
2
  gradio==5.49.1
3
+ transformers==5.19.0
4
  torch==2.8.0
5
  sentencepiece>=0.2.0,<0.3
6
  protobuf>=4.25,<7