Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/ymcui/Chinese-LLaMA-Alpaca-2
/ speculative_sample.py
File
speculative_sample.py
scripts/inference/speculative_sample.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
from
transformers
import
AutoTokenizer, AutoModelForCausalLM, GenerationConfig, PreTrainedModel
2
from
transformers
import
(
3
LogitsProcessorList,
4
StoppingCriteriaList,
Callers
nothing calls this directly
Calls
4
speculative_sample
Function · 0.85
generate_prompt
Function · 0.70
from_pretrained
Method · 0.45
eval
Method · 0.45
Tested by
no test coverage detected