Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/microsoft/BitNet
/ functions
Functions
397 in github.com/microsoft/BitNet
⨍
Functions
397
◇
Types & classes
61
↓ 1 callers
Method
bpe_tokens
(self)
utils/convert-ms-to-gguf-bitnet.py:475
↓ 1 callers
Method
bpe_tokens
(self)
utils/convert.py:475
↓ 1 callers
Method
build
Load a Llama or Code Llama checkpoint and return a new generator for this model.
gpu/generate.py:42
↓ 1 callers
Method
cleanup_model
Delete model file if it was created during this session.
utils/test_perplexity.py:314
↓ 1 callers
Method
cleanup_model
Cleanup model files (only delete newly created files) Args: output_suffix: Output file suffix
utils/quantize_embeddings.py:256
↓ 1 callers
Method
cleanup_temp_files
Clean up temporary files.
utils/test_perplexity.py:107
↓ 1 callers
Function
compile
()
setup_env.py:203
↓ 1 callers
Method
compile_generate
(self)
gpu/generate.py:159
↓ 1 callers
Method
compile_prefill
(self)
gpu/generate.py:102
↓ 1 callers
Function
compress_int2_to_int8
(int2_weight)
gpu/pack_weight.py:46
↓ 1 callers
Function
convert_back
( safetensors_path: str, output_file: str, model_name: Optional[str] = None, )
gpu/convert_safetensors.py:49
↓ 1 callers
Function
convert_model_names
(model: LazyModel, params: Params, skip_unknown: bool)
utils/convert-ms-to-gguf-bitnet.py:1374
↓ 1 callers
Function
convert_model_names
(model: LazyModel, params: Params, skip_unknown: bool)
utils/convert.py:1302
↓ 1 callers
Function
convert_to_output_type
(model: LazyModel, output_type: GGMLFileType)
utils/convert-ms-to-gguf-bitnet.py:1364
↓ 1 callers
Function
convert_to_output_type
(model: LazyModel, output_type: GGMLFileType)
utils/convert.py:1292
↓ 1 callers
Function
convert_ts_checkpoint
( *, input_path: str = "", )
gpu/convert_checkpoint.py:15
↓ 1 callers
Function
default_outfile
(model_paths: list[Path], file_type: GGMLFileType)
utils/convert-ms-to-gguf-bitnet.py:1621
↓ 1 callers
Function
default_outfile
(model_paths: list[Path], file_type: GGMLFileType)
utils/convert.py:1476
↓ 1 callers
Method
elements_to_bytes
(self, n_elements: int)
utils/convert-ms-to-gguf-bitnet.py:63
↓ 1 callers
Method
elements_to_bytes
(self, n_elements: int)
utils/convert.py:63
↓ 1 callers
Method
encode_dialog_prompt
(self, dialog: Dialog, completion=False, return_target=False)
gpu/tokenizer.py:242
↓ 1 callers
Method
encode_message
(self, message: Message, return_target=False)
gpu/tokenizer.py:225
↓ 1 callers
Method
extract_vocabulary_from_model
(self, vocab: Vocab)
utils/convert-ms-to-gguf-bitnet.py:1193
↓ 1 callers
Method
extract_vocabulary_from_model
(self, vocab: Vocab)
utils/convert.py:1123
↓ 1 callers
Method
find_best_config
Find the best configuration with highest throughput
utils/tune_gemm_config.py:166
↓ 1 callers
Method
find_datasets
Find all test.txt files in dataset directories.
utils/test_perplexity.py:63
↓ 1 callers
Function
find_multifile_paths
Given any path belonging to a multi-file model (e.g. foo.bin.1), return the whole list of paths in the model.
utils/convert-ms-to-gguf-bitnet.py:1529
↓ 1 callers
Function
find_multifile_paths
Given any path belonging to a multi-file model (e.g. foo.bin.1), return the whole list of paths in the model.
utils/convert.py:1384
↓ 1 callers
Method
forward
(self, input)
gpu/model.py:83
↓ 1 callers
Function
forward_t
(x)
utils/convert-ms-to-gguf-bitnet.py:946
↓ 1 callers
Method
from_model_architecture
(cls, arch)
utils/convert-hf-to-gguf-bitnet.py:236
↓ 1 callers
Method
from_model_architecture
(cls, arch)
utils/generate-dummy-bitnet-model.py:308
↓ 1 callers
Method
from_name
(cls, name: str)
gpu/convert_safetensors.py:36
↓ 1 callers
Function
gen_body_core_code
(bm, by)
utils/codegen_tl1.py:190
↓ 1 callers
Function
gen_code
()
setup_env.py:156
↓ 1 callers
Function
gen_ctor_code
()
utils/codegen_tl2.py:5
↓ 1 callers
Function
gen_ctor_code
()
utils/codegen_tl1.py:5
↓ 1 callers
Function
gen_preprocess_code
()
utils/codegen_tl1.py:310
↓ 1 callers
Function
gen_tbl_impl
(pre, BM, BK, bm, k_list)
utils/codegen_tl2.py:279
↓ 1 callers
Function
gen_tbl_impl
(pre, BM, BK, bm, k)
utils/codegen_tl1.py:224
↓ 1 callers
Function
gen_top_api
(kernel_shapes, k_list)
utils/codegen_tl2.py:532
↓ 1 callers
Function
gen_top_api
(kernel_shapes)
utils/codegen_tl1.py:285
↓ 1 callers
Function
gen_transform_code
(kernel_shapes)
utils/codegen_tl2.py:626
↓ 1 callers
Function
gen_transform_code
(kernel_shape)
utils/codegen_tl1.py:321
↓ 1 callers
Method
generate_all
( self, prompts: list[list[int]], use_cuda_graphs: bool, use_sampling: bool )
gpu/generate.py:217
↓ 1 callers
Function
generate_configurations
Generate list of configurations to test
utils/tune_gemm_config.py:262
↓ 1 callers
Method
generate_tensors
(self)
utils/generate-dummy-bitnet-model.py:824
↓ 1 callers
Function
get_prompts
(interactive: bool)
gpu/generate.py:307
↓ 1 callers
Method
get_tensors
(self)
utils/generate-dummy-bitnet-model.py:154
↓ 1 callers
Function
get_three_k_two_k
(K, bk)
utils/codegen_tl2.py:676
↓ 1 callers
Method
get_vocab_base
(self)
utils/convert-hf-to-gguf-bitnet.py:256
↓ 1 callers
Method
get_vocab_base_pre
(self, tokenizer)
utils/convert-hf-to-gguf-bitnet.py:291
↓ 1 callers
Method
get_vocab_base_pre
(self, tokenizer)
utils/generate-dummy-bitnet-model.py:361
↓ 1 callers
Method
guessed
(model: LazyModel)
utils/convert-ms-to-gguf-bitnet.py:232
↓ 1 callers
Method
guessed
(model: LazyModel)
utils/convert.py:232
↓ 1 callers
Method
hf_tokens
(self)
utils/convert-ms-to-gguf-bitnet.py:635
↓ 1 callers
Method
hf_tokens
(self)
utils/convert.py:635
↓ 1 callers
Function
interleave_weight_int8
(qweight, nbits=2)
gpu/pack_weight.py:56
↓ 1 callers
Function
invert_convert_k
(w: torch.Tensor, config: ModelArgs)
gpu/convert_safetensors.py:46
↓ 1 callers
Function
invert_convert_q
(w: torch.Tensor, config: ModelArgs)
gpu/convert_safetensors.py:43
↓ 1 callers
Function
lazy_load_safetensors_file
(fp: IO[bytes], path: Path)
utils/convert-ms-to-gguf-bitnet.py:1029
↓ 1 callers
Function
lazy_load_safetensors_file
(fp: IO[bytes], path: Path)
utils/convert.py:955
↓ 1 callers
Method
loadHFTransformerJson
(model: LazyModel, config_path: Path)
utils/convert-ms-to-gguf-bitnet.py:269
↓ 1 callers
Method
loadHFTransformerJson
(model: LazyModel, config_path: Path)
utils/convert.py:269
↓ 1 callers
Method
loadOriginalParamsJson
(model: LazyModel, config_path: Path)
utils/convert-ms-to-gguf-bitnet.py:326
↓ 1 callers
Method
loadOriginalParamsJson
(model: LazyModel, config_path: Path)
utils/convert.py:326
↓ 1 callers
Function
load_some_model
Load a model of any supported format.
utils/convert-ms-to-gguf-bitnet.py:1547
↓ 1 callers
Function
load_some_model
Load a model of any supported format.
utils/convert.py:1402
↓ 1 callers
Function
load_unquantized
(lazy_tensor: LazyTensor, expected_dtype: Any = None, convert: bool = False)
utils/convert-ms-to-gguf-bitnet.py:811
↓ 1 callers
Function
load_unquantized
(lazy_tensor: LazyTensor, expected_dtype: Any = None, convert: bool = False)
utils/convert.py:811
↓ 1 callers
Method
load_vocab
(self, vocab_types: list[str] | None, model_parent_path: Path)
utils/convert-ms-to-gguf-bitnet.py:1607
↓ 1 callers
Method
load_vocab
(self, vocab_types: list[str] | None, model_parent_path: Path)
utils/convert.py:1462
↓ 1 callers
Function
main
()
setup_env.py:218
↓ 1 callers
Function
main
()
utils/test_perplexity.py:539
↓ 1 callers
Function
main
()
utils/quantize_embeddings.py:394
↓ 1 callers
Function
main
()
utils/convert-hf-to-gguf-bitnet.py:1126
↓ 1 callers
Function
main
()
utils/convert-helper-bitnet.py:19
↓ 1 callers
Function
main
(args_in: list[str] | None = None)
utils/convert-ms-to-gguf-bitnet.py:1645
↓ 1 callers
Function
main
()
utils/generate-dummy-bitnet-model.py:963
↓ 1 callers
Function
main
()
utils/tune_gemm_config.py:296
↓ 1 callers
Function
main
(args_in: list[str] | None = None)
utils/convert.py:1500
↓ 1 callers
Method
map_tensor_name
(self, name: str, try_suffixes: Sequence[str] = (".weight", ".bias"))
utils/generate-dummy-bitnet-model.py:182
↓ 1 callers
Method
match_model_tensor_name
(self, name: str, key: gguf.MODEL_TENSOR, bid: int | None, suffix: str = ".weight")
utils/generate-dummy-bitnet-model.py:169
↓ 1 callers
Function
merge_multifile_models
(models_plus: list[ModelPlus])
utils/convert-ms-to-gguf-bitnet.py:901
↓ 1 callers
Function
merge_multifile_models
(models_plus: list[ModelPlus])
utils/convert.py:901
↓ 1 callers
Function
merge_sharded
(models: list[LazyModel])
utils/convert-ms-to-gguf-bitnet.py:867
↓ 1 callers
Function
merge_sharded
(models: list[LazyModel])
utils/convert.py:867
↓ 1 callers
Method
modify_tensors
(self, data_torch: Tensor, name: str, bid: int | None)
utils/convert-hf-to-gguf-bitnet.py:871
↓ 1 callers
Method
modify_tensors
(self, data_torch: Tensor, name: str, bid: int | None)
utils/convert-hf-to-gguf-bitnet.py:977
↓ 1 callers
Method
modify_tensors
(self, data_torch: Tensor, name: str, bid: int | None)
utils/generate-dummy-bitnet-model.py:852
↓ 1 callers
Function
nth_multifile_path
Given any path belonging to a multi-file model (e.g. foo.bin.1), return the nth path in the model.
utils/convert-ms-to-gguf-bitnet.py:1508
↓ 1 callers
Function
nth_multifile_path
Given any path belonging to a multi-file model (e.g. foo.bin.1), return the nth path in the model.
utils/convert.py:1363
↓ 1 callers
Function
pack_experts_lazy
(lazy_tensors: list[LazyTensor])
utils/convert.py:946
↓ 1 callers
Function
parse_args
()
setup_env.py:224
↓ 1 callers
Function
parse_args
()
utils/e2e_benchmark.py:48
↓ 1 callers
Function
parse_args
()
utils/convert-hf-to-gguf-bitnet.py:1095
↓ 1 callers
Function
parse_args
()
utils/generate-dummy-bitnet-model.py:1019
↓ 1 callers
Method
parse_benchmark_output
Parse benchmark output to extract t/s data (mean±std) Args: output: Benchmark command output output_
utils/quantize_embeddings.py:187
↓ 1 callers
Method
parse_perplexity
Parse perplexity value (mean±std format) from llama-perplexity output.
utils/test_perplexity.py:207
↓ 1 callers
Method
parse_throughput
Parse pp128 throughput from output
utils/tune_gemm_config.py:93
← previous
next →
101–200 of 397, ranked by callers