Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ if [[ -x "$(command -v nvidia-smi)" ]]; then
fi
(
set -x
$PIP_EXECUTABLE install evaluate=="0.4.3" lm-eval=="0.4.2" psutil=="6.0.0"
$PIP_EXECUTABLE install evaluate=="0.4.3" lm-eval=="0.4.7" psutil=="6.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope of this PR, but the duplicated requirements in here vs requirements.txt will be collapsed when we introduce packaging

)
2 changes: 1 addition & 1 deletion install/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ streamlit
flask

# eval
lm_eval==0.4.2
lm_eval==0.4.7
2 changes: 1 addition & 1 deletion torchchat/cli/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,4 +794,4 @@ def tokenizer_setting_to_name(tiktoken: bool, tokenizers: bool) -> str:
return "TikToken"
if tokenizers:
return "Tokenizers"
return "SentencePiece"
return "SentencePiece"
8 changes: 8 additions & 0 deletions torchchat/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,14 @@ def _add_evaluation_args(parser) -> None:
help="Maximum length sequence to evaluate",
)

eval_parser.add_argument(
"--modality",
type=str,
default="text",
choices=["text", "text-image"],
help="Modality of the model. Options: text, text-image",
)


# Add CLI Args related to distributed inference
# This feature is currently a [WIP] and hidden from --help
Expand Down
6 changes: 6 additions & 0 deletions torchchat/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ def setup_caches(self, batch_size, dtype, encoder_max_seq_len, decoder_max_seq_l
decoder_max_seq_len=decoder_max_seq_len,
)

def caches_are_setup(self) -> bool:
return self.model.caches_are_setup()

def caches_are_enabled(self) -> bool:
return self.model.caches_are_enabled()

def reset_caches(self):
self.model.reset_caches()

Expand Down
Loading