Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
1049451037 committed Oct 8, 2023
1 parent bb479b3 commit f69fde6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ We introduce CogVLM, a powerful open-source visual language foundation model. Di
pip install -r requirements.txt
python cli_demo.py --from_pretrained cogvlm-base-224 --version base --english --bf16 --no_prompt
python cli_demo.py --from_pretrained cogvlm-base-490 --version base --english --bf16 --no_prompt
python cli_demo.py --from_pretrained cogvlm-chat --version chat --english --fp16
python cli_demo.py --from_pretrained cogvlm-chat --version chat --english --bf16
python cli_demo.py --from_pretrained cogvlm-grounding-base --version base --english --bf16
python cli_demo.py --from_pretrained cogvlm-grounding-generalist --version base --english --bf16
# We also support model parallel inference, which splits model to multiple (2/4/8) GPUs.
torchrun --standalone --nnodes=1 --nproc-per-node=2 cli_demo.py --from_pretrained cogvlm-chat --version chat --english --fp16
torchrun --standalone --nnodes=1 --nproc-per-node=2 cli_demo.py --from_pretrained cogvlm-chat --version chat --english --bf16
```

If you have trouble in accessing huggingface.co, you can add `--local_tokenizer /path/to/vicuna-7b-v1.5` to load the tokenizer.
Expand All @@ -48,7 +48,7 @@ To evaluate the performance of your model, use:
bash scripts/evaluate.sh checkpoints/your_model_path
```

The anticipated results are approximately **94.53%** accuracy. When disregarding letter cases, the accuracy is around **95.13%**.
The anticipated result is approximately **98.13%** accuracy.

## Citation

4 changes: 3 additions & 1 deletion models/cogvlm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def override_dist_dtype_device_args(args, b={}):
mode=args.mode,
checkpoint_activations=args.checkpoint_activations,
checkpoint_num_layers=args.checkpoint_num_layers,
device=args.device
device=args.device,
hidden_dropout=0.,
attention_dropout=0.
)
if hasattr(args, 'model_parallel_size'):
b['model_parallel_size'] = args.model_parallel_size
Expand Down

0 comments on commit f69fde6

Please sign in to comment.