Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenBitSys/BitDistiller
/ functions
Functions
1,634 in github.com/OpenBitSys/BitDistiller
⨍
Functions
1,634
◇
Types & classes
490
↓ 2 callers
Method
from_linear
(cls, linear, w_bit, group_size, init_only=False, scales=None, zeros=None)
quantization/qmodule.py:71
↓ 2 callers
Function
get_calib_dataset
(datasets="pileval", tokenizer=None, n_samples=128, block_size=1024)
quantization/clip_utils.py:10
↓ 2 callers
Function
get_named_linears
(module)
test/test_utils.py:12
↓ 2 callers
Function
get_overlaps_dump_path
(task_name, task_set, ngrams_n_size, limit)
test/general/lm_eval/decontamination/decontaminate.py:49
↓ 2 callers
Method
has_test_docs
Whether the task has a test set
test/general/lm_eval/base.py:562
↓ 2 callers
Function
hmma_fp32
inference/kernels/csrc/attention/decoder_masked_multihead_attention_template.hpp:407
↓ 2 callers
Method
insert_prompt
(self, input_prompt)
inference/utils/prompt_templates.py:61
↓ 2 callers
Function
is_number
(s)
test/gsm8k/eval.py:10
↓ 2 callers
Function
is_partial_stop
Check whether the output contains a partial stop str.
inference/stream_generators/falcon_stream_gen.py:13
↓ 2 callers
Method
last_boxed_only_string
(self, string)
test/general/lm_eval/tasks/hendrycks_math.py:117
↓ 2 callers
Function
load_awq_llama_fast
(model, checkpoint, w_bit, group_size, device)
inference/utils/load_quant.py:129
↓ 2 callers
Function
load_awq_model
(model, checkpoint, w_bit, group_size, device)
inference/utils/load_quant.py:51
↓ 2 callers
Function
make_divisible
(c, divisor)
quantization/qmodule.py:12
↓ 2 callers
Function
mem_efficient_load_checkpoint
( model: nn.Module, ckpts_folder: Union[str, os.PathLike], )
inference/utils/load_quant.py:17
↓ 2 callers
Function
metric_max_over_ground_truths
Compute max metric between prediction and each ground truth.
test/general/lm_eval/metrics.py:85
↓ 2 callers
Function
normalize_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 callers
Function
oa_completion
Query OpenAI API for completion. Retry with back-off until they respond
test/general/lm_eval/models/gpt3.py:38
↓ 2 callers
Function
padding
(inputs, padding_token, cutoff = None)
data/generation/single_generate.py:111
↓ 2 callers
Function
padding
(inputs, padding_token, cutoff = None)
data/generation/generate.py:111
↓ 2 callers
Function
padding
(inputs, padding_token, cutoff = None)
test/gsm8k/test.py:139
↓ 2 callers
Function
parse_gold
(lines)
test/gsm8k/eval.py:68
↓ 2 callers
Method
partial_context
(cls, doc, option)
test/general/lm_eval/tasks/winogrande.py:67
↓ 2 callers
Method
partial_context
(cls, doc, option)
test/general/lm_eval/tasks/wsc273.py:106
↓ 2 callers
Method
partial_target
(cls, doc)
test/general/lm_eval/tasks/winogrande.py:77
↓ 2 callers
Method
partial_target
(cls, doc)
test/general/lm_eval/tasks/wsc273.py:115
↓ 2 callers
Method
preprocess
(cls, text)
test/general/lm_eval/tasks/hellaswag.py:63
↓ 2 callers
Function
pseudo_quantize_tensor
(w, n_bit=8, zero_point=True, q_group_size=-1, inplace=F
quantization/quantizer.py:25
↓ 2 callers
Method
read
(self, file, get_meta=False, autojoin_paragraphs=True, para_joiner="\n\n")
test/general/lm_eval/decontamination/archiver.py:50
↓ 2 callers
Function
real_quantize_model_weight
( model, w_bit, q_config, init_only=False )
quantization/quantizer.py:74
↓ 2 callers
Method
remove_boxed
(self, s)
test/general/lm_eval/tasks/hendrycks_math.py:104
↓ 2 callers
Function
rotate_half
(x)
inference/models/falcon.py:20
↓ 2 callers
Function
sample_stddev
(arr)
test/general/lm_eval/metrics.py:19
↓ 2 callers
Function
sequence_gather
(s, world_size, pad_tok_id)
data/generation/generate.py:24
↓ 2 callers
Function
sequence_gather
(s, world_size, pad_tok_id)
test/gsm8k/test.py:153
↓ 2 callers
Function
set_op_by_name
(layer, name, new_module)
quantization/pre_quant.py:19
↓ 2 callers
Function
smart_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 callers
Function
stop_sequences_criteria
( tokenizer: transformers.PreTrainedTokenizer, stop_sequences: List[str], initial_decoder_input_le
test/general/lm_eval/models/huggingface.py:754
↓ 2 callers
Method
strip_string
(self, string)
test/general/lm_eval/tasks/hendrycks_math.py:219
↓ 2 callers
Function
textsynth_completion
Query TextSynth API for completion. Retry with back-off until they respond.
test/general/lm_eval/models/textsynth.py:25
↓ 2 callers
Method
tok_encode
(self, string: str)
test/general/lm_eval/models/gpt3.py:111
↓ 2 callers
Method
tok_encode
(self, string: str)
test/general/lm_eval/models/huggingface.py:419
↓ 2 callers
Method
update_template
(self, outputs)
inference/utils/prompt_templates.py:64
↓ 2 callers
Function
vec_from_smem_transpose
inference/kernels/csrc/attention/decoder_masked_multihead_attention_utils.h:1524
↓ 2 callers
Function
weighted_mean
(items)
test/general/lm_eval/metrics.py:98
↓ 2 callers
Function
word_ngrams
Splits a string into ngram words
test/general/lm_eval/decontamination/janitor.py:39
↓ 2 callers
Function
write_smem_transpose
inference/kernels/csrc/attention/decoder_masked_multihead_attention_utils.h:1667
↓ 1 callers
Method
TLSD_loss
(self, labels, student_logits, teacher_logits)
train/mytrainer.py:104
↓ 1 callers
Method
__init__
(self, w_bit, group_size, in_features, out_features, bias, dev)
quantization/qmodule.py:42
↓ 1 callers
Method
__init__
(self)
test/general/lm_eval/base.py:22
↓ 1 callers
Method
__init__
(self)
test/general/lm_eval/tasks/hendrycks_test.py:98
↓ 1 callers
Method
__init__
(self)
test/general/lm_eval/tasks/translation.py:111
↓ 1 callers
Method
__init__
(self, no_metric=False)
test/general/lm_eval/tasks/scrolls.py:136
↓ 1 callers
Method
_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 callers
Function
_argmax
argmax with deterministic pseudorandom tie breaking.
test/general/lm_eval/tasks/bigbench.py:182
↓ 1 callers
Method
_compute_f1
(self, predicted_bag, gold_bag)
test/general/lm_eval/tasks/drop.py:215
↓ 1 callers
Method
_create_auto_model
Returns a pre-trained pytorch model from a pre-trained model configuration.
test/general/lm_eval/models/huggingface.py:263
↓ 1 callers
Method
_create_auto_model_peft
( self, *, model: transformers.PreTrainedModel, peft: str, revision: s
test/general/lm_eval/models/huggingface.py:318
↓ 1 callers
Method
_create_auto_tokenizer
Returns a pre-trained tokenizer from a pre-trained tokenizer configuration.
test/general/lm_eval/models/huggingface.py:336
↓ 1 callers
Method
_doc_to_few_shot_context
(self, shots)
test/general/lm_eval/tasks/bigbench.py:131
↓ 1 callers
Function
_download_metric
()
test/general/lm_eval/tasks/scrolls.py:71
↓ 1 callers
Function
_drop_duplicates_in_input
(untokenized_dataset)
test/general/lm_eval/tasks/scrolls.py:99
↓ 1 callers
Method
_encode_pair
(self, context, continuation)
test/general/lm_eval/base.py:201
↓ 1 callers
Method
_extract_answer
(self, completion)
test/general/lm_eval/tasks/mgsm.py:105
↓ 1 callers
Method
_fix_number
(self, text)
test/general/lm_eval/tasks/drop.py:265
↓ 1 callers
Method
_format_subject
(self, subject)
test/general/lm_eval/tasks/hendrycks_test.py:133
↓ 1 callers
Function
_get_accelerate_args
Returns the kwargs needed to apply `accelerate` in `AutoModel.from_pretrained`.
test/general/lm_eval/models/huggingface.py:21
↓ 1 callers
Function
_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 callers
Method
_get_prune_text
(self, sample)
test/general/lm_eval/tasks/scrolls.py:171
↓ 1 callers
Function
_get_unique_examples
(examples)
test/general/lm_eval/tasks/bigbench.py:172
↓ 1 callers
Function
_get_valid_answers
(scores)
test/general/lm_eval/tasks/bigbench.py:167
↓ 1 callers
Method
_is_correct
(self, completion, answer)
test/general/lm_eval/tasks/mgsm.py:112
↓ 1 callers
Method
_is_correct
(self, completion, answer)
test/general/lm_eval/tasks/gsm8k.py:95
↓ 1 callers
Method
_make_compute_metrics
(self, value)
test/general/lm_eval/tasks/scrolls.py:210
↓ 1 callers
Function
_make_r_io_base
(f, mode: str)
train/train.py:29
↓ 1 callers
Method
_match_numbers_if_present
(self, gold_bag, predicted_bag)
test/general/lm_eval/tasks/drop.py:232
↓ 1 callers
Method
_model_call
( self, inputs: TokenSequence, labels: Optional[TokenSequence] = None )
test/general/lm_eval/models/huggingface.py:685
↓ 1 callers
Method
_model_generate
(self, context, max_length, eos_token_id)
test/general/lm_eval/base.py:162
↓ 1 callers
Method
_model_generate
( self, inputs: transformers.BatchEncoding, max_tokens: int, stop: Optional[Li
test/general/lm_eval/models/huggingface.py:530
↓ 1 callers
Method
_normalize
(self, answer)
test/general/lm_eval/tasks/drop.py:271
↓ 1 callers
Function
_postprocess_output
(text, max_length, stop_string, output_regex)
test/general/lm_eval/tasks/bigbench.py:191
↓ 1 callers
Method
_process_doc
(self, doc)
test/general/lm_eval/tasks/scrolls.py:357
↓ 1 callers
Method
_question2id
Returns an identifier for the question in the given document.
test/general/lm_eval/tasks/mc_taco.py:104
↓ 1 callers
Method
_remove_articles
(self, text)
test/general/lm_eval/tasks/drop.py:252
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
test/general/lm_eval/tasks/triviaqa.py:65
↓ 1 callers
Method
_remove_prefixes
(self, aliases)
test/general/lm_eval/tasks/webqs.py:71
↓ 1 callers
Method
_remove_punc
(self, text)
test/general/lm_eval/tasks/drop.py:258
↓ 1 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
inference/modules/fused_attn.py:40
↓ 1 callers
Function
_squad_metric
(predictions, references)
test/general/lm_eval/tasks/squad.py:35
↓ 1 callers
Function
_time_module
(module, inputs, measure_iters=1000)
inference/utils/tune.py:16
↓ 1 callers
Method
_tokenize
(self, text)
test/general/lm_eval/tasks/drop.py:268
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
data/generation/single_generate.py:61
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
data/generation/generate.py:61
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
test/gsm8k/test.py:72
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
train/train.py:136
↓ 1 callers
Method
_white_space_fix
(self, text)
test/general/lm_eval/tasks/drop.py:255
↓ 1 callers
Function
add_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 callers
Function
anthropic_completion
Query Anthropic API for completion. Retry with back-off until they respond
test/general/lm_eval/models/anthropic_llms.py:7
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
test/general/lm_eval/tasks/winogrande.py:102
↓ 1 callers
Method
append_context
(cls, ctx, partial_ctx)
test/general/lm_eval/tasks/wsc273.py:140
↓ 1 callers
Function
append_nvcc_threads
(nvcc_extra_args)
inference/kernels/csrc/attention/setup.py:55
← previous
next →
101–200 of 1,634, ranked by callers