MCPcopy
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

1from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig, PreTrainedModel
2from transformers import (
3 LogitsProcessorList,
4 StoppingCriteriaList,

Callers

nothing calls this directly

Calls 4

speculative_sampleFunction · 0.85
generate_promptFunction · 0.70
from_pretrainedMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected