MCPcopy Create free account

hub / github.com/OpenBitSys/BitDistiller / functions

Functions1,634 in github.com/OpenBitSys/BitDistiller

↓ 2 callersMethodfrom_linear
(cls, linear, w_bit, group_size, init_only=False, scales=None, zeros=None)
quantization/qmodule.py:71
↓ 2 callersFunctionget_calib_dataset
(datasets="pileval", tokenizer=None, n_samples=128, block_size=1024)
quantization/clip_utils.py:10
↓ 2 callersFunctionget_named_linears
(module)
test/test_utils.py:12
↓ 2 callersFunctionget_overlaps_dump_path
(task_name, task_set, ngrams_n_size, limit)
test/general/lm_eval/decontamination/decontaminate.py:49
↓ 2 callersMethodhas_test_docs
Whether the task has a test set
test/general/lm_eval/base.py:562
↓ 2 callersFunctionhmma_fp32
inference/kernels/csrc/attention/decoder_masked_multihead_attention_template.hpp:407
↓ 2 callersMethodinsert_prompt
(self, input_prompt)
inference/utils/prompt_templates.py:61
↓ 2 callersFunctionis_number
(s)
test/gsm8k/eval.py:10
↓ 2 callersFunctionis_partial_stop
Check whether the output contains a partial stop str.
inference/stream_generators/falcon_stream_gen.py:13
↓ 2 callersMethodlast_boxed_only_string
(self, string)
test/general/lm_eval/tasks/hendrycks_math.py:117
↓ 2 callersFunctionload_awq_llama_fast
(model, checkpoint, w_bit, group_size, device)
inference/utils/load_quant.py:129
↓ 2 callersFunctionload_awq_model
(model, checkpoint, w_bit, group_size, device)
inference/utils/load_quant.py:51
↓ 2 callersFunctionmake_divisible
(c, divisor)
quantization/qmodule.py:12
↓ 2 callersFunctionmem_efficient_load_checkpoint
( model: nn.Module, ckpts_folder: Union[str, os.PathLike], )
inference/utils/load_quant.py:17
↓ 2 callersFunctionmetric_max_over_ground_truths
Compute max metric between prediction and each ground truth.
test/general/lm_eval/metrics.py:85
↓ 2 callersFunctionnormalize_answer
Taken from the official evaluation script for v1.1 of the SQuAD dataset. Lower text and remove punctuation, articles and extra whitespace.
test/general/lm_eval/tasks/qasper.py:43
↓ 2 callersFunctionoa_completion
Query OpenAI API for completion. Retry with back-off until they respond
test/general/lm_eval/models/gpt3.py:38
↓ 2 callersFunctionpadding
(inputs, padding_token, cutoff = None)
data/generation/single_generate.py:111
↓ 2 callersFunctionpadding
(inputs, padding_token, cutoff = None)
data/generation/generate.py:111
↓ 2 callersFunctionpadding
(inputs, padding_token, cutoff = None)
test/gsm8k/test.py:139
↓ 2 callersFunctionparse_gold
(lines)
test/gsm8k/eval.py:68
↓ 2 callersMethodpartial_context
(cls, doc, option)
test/general/lm_eval/tasks/winogrande.py:67
↓ 2 callersMethodpartial_context
(cls, doc, option)
test/general/lm_eval/tasks/wsc273.py:106
↓ 2 callersMethodpartial_target
(cls, doc)
test/general/lm_eval/tasks/winogrande.py:77
↓ 2 callersMethodpartial_target
(cls, doc)
test/general/lm_eval/tasks/wsc273.py:115
↓ 2 callersMethodpreprocess
(cls, text)
test/general/lm_eval/tasks/hellaswag.py:63
↓ 2 callersFunctionpseudo_quantize_tensor
(w, n_bit=8, zero_point=True, q_group_size=-1, inplace=F
quantization/quantizer.py:25
↓ 2 callersMethodread
(self, file, get_meta=False, autojoin_paragraphs=True, para_joiner="\n\n")
test/general/lm_eval/decontamination/archiver.py:50
↓ 2 callersFunctionreal_quantize_model_weight
( model, w_bit, q_config, init_only=False )
quantization/quantizer.py:74
↓ 2 callersMethodremove_boxed
(self, s)
test/general/lm_eval/tasks/hendrycks_math.py:104
↓ 2 callersFunctionrotate_half
(x)
inference/models/falcon.py:20
↓ 2 callersFunctionsample_stddev
(arr)
test/general/lm_eval/metrics.py:19
↓ 2 callersFunctionsequence_gather
(s, world_size, pad_tok_id)
data/generation/generate.py:24
↓ 2 callersFunctionsequence_gather
(s, world_size, pad_tok_id)
test/gsm8k/test.py:153
↓ 2 callersFunctionset_op_by_name
(layer, name, new_module)
quantization/pre_quant.py:19
↓ 2 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
train/train.py:113
↓ 2 callersFunctionstop_sequences_criteria
( tokenizer: transformers.PreTrainedTokenizer, stop_sequences: List[str], initial_decoder_input_le
test/general/lm_eval/models/huggingface.py:754
↓ 2 callersMethodstrip_string
(self, string)
test/general/lm_eval/tasks/hendrycks_math.py:219
↓ 2 callersFunctiontextsynth_completion
Query TextSynth API for completion. Retry with back-off until they respond.
test/general/lm_eval/models/textsynth.py:25
↓ 2 callersMethodtok_encode
(self, string: str)
test/general/lm_eval/models/gpt3.py:111
↓ 2 callersMethodtok_encode
(self, string: str)
test/general/lm_eval/models/huggingface.py:419
↓ 2 callersMethodupdate_template
(self, outputs)
inference/utils/prompt_templates.py:64
↓ 2 callersFunctionvec_from_smem_transpose
inference/kernels/csrc/attention/decoder_masked_multihead_attention_utils.h:1524
↓ 2 callersFunctionweighted_mean
(items)
test/general/lm_eval/metrics.py:98
↓ 2 callersFunctionword_ngrams
Splits a string into ngram words
test/general/lm_eval/decontamination/janitor.py:39
↓ 2 callersFunctionwrite_smem_transpose
inference/kernels/csrc/attention/decoder_masked_multihead_attention_utils.h:1667
↓ 1 callersMethodTLSD_loss
(self, labels, student_logits, teacher_logits)
train/mytrainer.py:104
↓ 1 callersMethod__init__
(self, w_bit, group_size, in_features, out_features, bias, dev)
quantization/qmodule.py:42
↓ 1 callersMethod__init__
(self)
test/general/lm_eval/base.py:22
↓ 1 callersMethod__init__
(self)
test/general/lm_eval/tasks/hendrycks_test.py:98
↓ 1 callersMethod__init__
(self)
test/general/lm_eval/tasks/translation.py:111
↓ 1 callersMethod__init__
(self, no_metric=False)
test/general/lm_eval/tasks/scrolls.py:136
↓ 1 callersMethod_align_bags
Takes gold and predicted answer sets and first finds the optimal 1-1 alignment between them and gets maximum metric values over all t
test/general/lm_eval/tasks/drop.py:196
↓ 1 callersFunction_argmax
argmax with deterministic pseudorandom tie breaking.
test/general/lm_eval/tasks/bigbench.py:182
↓ 1 callersMethod_compute_f1
(self, predicted_bag, gold_bag)
test/general/lm_eval/tasks/drop.py:215
↓ 1 callersMethod_create_auto_model
Returns a pre-trained pytorch model from a pre-trained model configuration.
test/general/lm_eval/models/huggingface.py:263
↓ 1 callersMethod_create_auto_model_peft
( self, *, model: transformers.PreTrainedModel, peft: str, revision: s
test/general/lm_eval/models/huggingface.py:318
↓ 1 callersMethod_create_auto_tokenizer
Returns a pre-trained tokenizer from a pre-trained tokenizer configuration.
test/general/lm_eval/models/huggingface.py:336
↓ 1 callersMethod_doc_to_few_shot_context
(self, shots)
test/general/lm_eval/tasks/bigbench.py:131
↓ 1 callersFunction_download_metric
()
test/general/lm_eval/tasks/scrolls.py:71
↓ 1 callersFunction_drop_duplicates_in_input
(untokenized_dataset)
test/general/lm_eval/tasks/scrolls.py:99
↓ 1 callersMethod_encode_pair
(self, context, continuation)
test/general/lm_eval/base.py:201
↓ 1 callersMethod_extract_answer
(self, completion)
test/general/lm_eval/tasks/mgsm.py:105
↓ 1 callersMethod_fix_number
(self, text)
test/general/lm_eval/tasks/drop.py:265
↓ 1 callersMethod_format_subject
(self, subject)
test/general/lm_eval/tasks/hendrycks_test.py:133
↓ 1 callersFunction_get_accelerate_args
Returns the kwargs needed to apply `accelerate` in `AutoModel.from_pretrained`.
test/general/lm_eval/models/huggingface.py:21
↓ 1 callersFunction_get_dtype
Converts `dtype` from `str` to torch.dtype when possible. Does not use an instantiated HF AutoConfig
test/general/lm_eval/models/gpt2.py:7
↓ 1 callersMethod_get_prune_text
(self, sample)
test/general/lm_eval/tasks/scrolls.py:171
↓ 1 callersFunction_get_unique_examples
(examples)
test/general/lm_eval/tasks/bigbench.py:172
↓ 1 callersFunction_get_valid_answers
(scores)
test/general/lm_eval/tasks/bigbench.py:167
↓ 1 callersMethod_is_correct
(self, completion, answer)
test/general/lm_eval/tasks/mgsm.py:112
↓ 1 callersMethod_is_correct
(self, completion, answer)
test/general/lm_eval/tasks/gsm8k.py:95
↓ 1 callersMethod_make_compute_metrics
(self, value)
test/general/lm_eval/tasks/scrolls.py:210
↓ 1 callersFunction_make_r_io_base
(f, mode: str)
train/train.py:29
↓ 1 callersMethod_match_numbers_if_present
(self, gold_bag, predicted_bag)
test/general/lm_eval/tasks/drop.py:232
↓ 1 callersMethod_model_call
( self, inputs: TokenSequence, labels: Optional[TokenSequence] = None )
test/general/lm_eval/models/huggingface.py:685
↓ 1 callersMethod_model_generate
(self, context, max_length, eos_token_id)
test/general/lm_eval/base.py:162
↓ 1 callersMethod_model_generate
( self, inputs: transformers.BatchEncoding, max_tokens: int, stop: Optional[Li
test/general/lm_eval/models/huggingface.py:530
↓ 1 callersMethod_normalize
(self, answer)
test/general/lm_eval/tasks/drop.py:271
↓ 1 callersFunction_postprocess_output
(text, max_length, stop_string, output_regex)
test/general/lm_eval/tasks/bigbench.py:191
↓ 1 callersMethod_process_doc
(self, doc)
test/general/lm_eval/tasks/scrolls.py:357
↓ 1 callersMethod_question2id
Returns an identifier for the question in the given document.
test/general/lm_eval/tasks/mc_taco.py:104
↓ 1 callersMethod_remove_articles
(self, text)
test/general/lm_eval/tasks/drop.py:252
↓ 1 callersMethod_remove_prefixes
(self, aliases)
test/general/lm_eval/tasks/triviaqa.py:65
↓ 1 callersMethod_remove_prefixes
(self, aliases)
test/general/lm_eval/tasks/webqs.py:71
↓ 1 callersMethod_remove_punc
(self, text)
test/general/lm_eval/tasks/drop.py:258
↓ 1 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
inference/modules/fused_attn.py:40
↓ 1 callersFunction_squad_metric
(predictions, references)
test/general/lm_eval/tasks/squad.py:35
↓ 1 callersFunction_time_module
(module, inputs, measure_iters=1000)
inference/utils/tune.py:16
↓ 1 callersMethod_tokenize
(self, text)
test/general/lm_eval/tasks/drop.py:268
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
data/generation/single_generate.py:61
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
data/generation/generate.py:61
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
test/gsm8k/test.py:72
↓ 1 callersFunction_tokenize_fn
Tokenize a list of strings.
train/train.py:136
↓ 1 callersMethod_white_space_fix
(self, text)
test/general/lm_eval/tasks/drop.py:255
↓ 1 callersFunctionadd_json_task
Add a JSON perplexity task if the given task name matches the JSON task specification. See `json.JsonPerplexity`.
test/general/lm_eval/tasks/__init__.py:340
↓ 1 callersFunctionanthropic_completion
Query Anthropic API for completion. Retry with back-off until they respond
test/general/lm_eval/models/anthropic_llms.py:7
↓ 1 callersMethodappend_context
(cls, ctx, partial_ctx)
test/general/lm_eval/tasks/winogrande.py:102
↓ 1 callersMethodappend_context
(cls, ctx, partial_ctx)
test/general/lm_eval/tasks/wsc273.py:140
↓ 1 callersFunctionappend_nvcc_threads
(nvcc_extra_args)
inference/kernels/csrc/attention/setup.py:55
← previousnext →101–200 of 1,634, ranked by callers