mirror of
https://github.com/wassname/minicache.git
synced 2026-06-27 15:15:59 +08:00
Update README.md
This commit is contained in:
committed by
GitHub
parent
daf3e67e22
commit
4e93666041
@@ -20,12 +20,15 @@ uv add git+https://github.com/wassname/minicache.git
|
|||||||
```py
|
```py
|
||||||
from minicache import cached, cache_call
|
from minicache import cached, cache_call
|
||||||
|
|
||||||
# 1. Decorator: hashes (state, included args). Excludes drop out of key.
|
@cached(exclude=["model", "tok"]) # can't hash model or tokenizer, but model_id will substitute
|
||||||
@cached(exclude=["model", "tok"])
|
|
||||||
def run_eval(model, tok, *, model_id, name, batch_size):
|
def run_eval(model, tok, *, model_id, name, batch_size):
|
||||||
return tinymfv_evaluate(model, tok, name=name, batch_size=batch_size)
|
return tinymfv_evaluate(model, tok, name=name, batch_size=batch_size)
|
||||||
|
|
||||||
report = run_eval(model, tok, model_id="qwen-27b", name="classic", batch_size=16)
|
report = run_eval(model, tok, model_id="qwen-27b", name="classic", batch_size=16)
|
||||||
|
# 30 minutes
|
||||||
|
|
||||||
|
report = run_eval(model, tok, model_id="qwen-27b", name="classic", batch_size=16)
|
||||||
|
# 0 minutes, gives saved results
|
||||||
```
|
```
|
||||||
|
|
||||||
See also
|
See also
|
||||||
|
|||||||
Reference in New Issue
Block a user