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
Method
__init__
(self, tokenizer: Tokenizer)
gpu/tokenizer.py:198
Method
__init__
( self, args: GenArgs, model_args: fast.ModelArgs, prefill_model: fast.Tra
gpu/generate.py:79
Method
__init__
(self, in_features: int, out_features: int, bias: bool = False)
gpu/model.py:60
Method
__init__
( self, dim: int, hidden_dim: int, norm_eps: float, use_kernel: b
gpu/model.py:169
Method
__init__
(self, args: ModelArgs)
gpu/model.py:201
Method
__init__
(self, args: ModelArgs)
gpu/model.py:247
Method
__init__
(self)
gpu/stats.py:32
Method
__post_init__
(self)
gpu/convert_safetensors.py:26
Method
__repr__
(self)
utils/convert-ms-to-gguf-bitnet.py:404
Method
__repr__
(self)
utils/convert-ms-to-gguf-bitnet.py:490
Method
__repr__
(self)
utils/convert-ms-to-gguf-bitnet.py:561
Method
__repr__
(self)
utils/convert-ms-to-gguf-bitnet.py:684
Method
__repr__
(self)
utils/convert.py:404
Method
__repr__
(self)
utils/convert.py:490
Method
__repr__
(self)
utils/convert.py:561
Method
__repr__
(self)
utils/convert.py:684
Method
all_tokens
(self)
utils/convert-ms-to-gguf-bitnet.py:486
Method
all_tokens
(self)
utils/convert-ms-to-gguf-bitnet.py:557
Method
all_tokens
(self)
utils/convert-ms-to-gguf-bitnet.py:680
Method
all_tokens
(self)
utils/convert.py:486
Method
all_tokens
(self)
utils/convert.py:557
Method
astype
(self, data_type: DataType)
utils/convert-ms-to-gguf-bitnet.py:788
Method
astype
(self, data_type: DataType)
utils/convert-ms-to-gguf-bitnet.py:844
Method
astype
(self, data_type: DataType)
utils/convert.py:788
Method
astype
(self, data_type: DataType)
utils/convert.py:844
Function
cache_prefix
Take a prefix view of a larger cache. The original cache object remains of identical size and valid after the shrinked alias has bee
gpu/model.py:346
Method
decode
(self, tokens: List[int])
gpu/tokenizer.py:202
Method
do_item
(item: tuple[str, LazyTensor])
utils/convert-ms-to-gguf-bitnet.py:1301
Method
do_item
(item: tuple[str, LazyTensor])
utils/convert.py:1232
Method
elements_to_bytes
(self, n_elements: int)
utils/convert-ms-to-gguf-bitnet.py:87
Method
elements_to_bytes
(self, n_elements: int)
utils/convert.py:87
Method
forward
(self, input)
gpu/model.py:73
Method
forward
( self, x: torch.Tensor, cache: LayerCache, attn_bias: AttnBias, )
gpu/model.py:121
Method
forward
(self, x: torch.Tensor)
gpu/model.py:192
Method
forward
( self, x: torch.Tensor, cache: LayerCache, attn_bias: AttnBias, )
gpu/model.py:231
Method
forward
( self, token_values: torch.Tensor, token_lengths: torch.Tensor, start_pos
gpu/model.py:283
Method
func
(modelcls: type[Model])
utils/convert-hf-to-gguf-bitnet.py:229
Method
func
(modelcls: type[Model])
utils/generate-dummy-bitnet-model.py:301
Method
generate_extra_tensors
(self)
utils/convert-hf-to-gguf-bitnet.py:916
Method
get_ppl_value
(result)
utils/test_perplexity.py:502
Method
get_vocab_base
(self)
utils/generate-dummy-bitnet-model.py:328
Method
has_newline_token
(self)
utils/convert-ms-to-gguf-bitnet.py:677
Method
has_newline_token
(self)
utils/convert.py:677
Function
load
()
utils/convert-ms-to-gguf-bitnet.py:892
Function
load
()
utils/convert.py:892
Method
load
(self)
utils/convert-ms-to-gguf-bitnet.py:837
Method
load
(self)
utils/convert.py:837
Function
main
(ckpt_dir: str, interactive: bool = False, chat_format: bool = False, sampling: bool = False)
gpu/generate.py:322
Function
make_cache
Allocate a cache to be used with the Transformer module. Args: args (ModelArgs): the model configuration. length (int):
gpu/model.py:299
Method
maybe_do_quantize
(item: tuple[DataType, NDArray])
utils/convert-ms-to-gguf-bitnet.py:1307
Method
maybe_do_quantize
(item: tuple[DataType, NDArray])
utils/convert.py:1238
Method
model_arch
(self)
utils/convert-hf-to-gguf-bitnet.py:68
Method
model_arch
(self)
utils/generate-dummy-bitnet-model.py:140
Function
must_read
(fp: IO[bytes], length: int)
utils/convert-ms-to-gguf-bitnet.py:1053
Function
must_read
(fp: IO[bytes], length: int)
utils/convert.py:979
Function
pack_experts_lazy
(lazy_tensors: list[LazyTensor])
utils/convert-ms-to-gguf-bitnet.py:1020
Method
part
(self, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:803
Method
part
(self, n_part: int)
utils/convert.py:803
Function
part_lazy
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:937
Function
part_lazy_k
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:968
Function
part_lazy_q
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:960
Function
part_lazy_rope
(lazy_tensor: LazyTensor)
utils/convert-ms-to-gguf-bitnet.py:1004
Function
part_lazy_v
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:976
Function
part_lazy_w1
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:986
Function
part_lazy_w3
(lazy_tensor: LazyTensor, n_part: int)
utils/convert-ms-to-gguf-bitnet.py:995
Function
part_lazy_weight_quant
(lazy_tensor: LazyTensor, name)
utils/convert-ms-to-gguf-bitnet.py:1011
Method
permute
(self, n_head: int, n_head_kv: int)
utils/convert-ms-to-gguf-bitnet.py:807
Method
permute
(self, n_head: int, n_head_kv: int)
utils/convert.py:807
Function
permute_lazy
(lazy_tensor: LazyTensor, n_head: int, n_head_kv: int)
utils/convert-ms-to-gguf-bitnet.py:924
Method
permute_part
(self, n_part: int, n_head: int, n_head_kv: int)
utils/convert-ms-to-gguf-bitnet.py:799
Method
permute_part
(self, n_part: int, n_head: int, n_head_kv: int)
utils/convert.py:799
Function
permute_part_lazy
(lazy_tensor: LazyTensor, n_part: int, n_head: int, n_head_kv: int)
utils/convert-ms-to-gguf-bitnet.py:930
Method
prepare_tensors
(self)
utils/convert-hf-to-gguf-bitnet.py:945
Method
quantize
(self, arr: NDArray)
utils/convert-ms-to-gguf-bitnet.py:95
Method
quantize
(self, arr: NDArray)
utils/convert.py:95
Method
quantize_blocks_q8_0
(blocks: NDArray)
utils/convert-ms-to-gguf-bitnet.py:102
Method
quantize_blocks_q8_0
(blocks: NDArray)
utils/convert.py:102
Function
read_gguf_file
Reads and prints key-value pairs and tensor information from a GGUF file in an improved format. Parameters: - gguf_file_path: Path to th
utils/generate-dummy-bitnet-model.py:990
Function
read_model_config
(model_dir: str)
utils/convert-hf-to-gguf-bitnet.py:675
Method
register
(cls, *names: str)
utils/generate-dummy-bitnet-model.py:298
Method
replay
(tokens, seq_lens=None)
gpu/generate.py:147
Method
set_gguf_parameters
(self)
utils/convert-hf-to-gguf-bitnet.py:834
Method
set_gguf_parameters
(self)
utils/convert-hf-to-gguf-bitnet.py:962
Method
set_gguf_parameters
(self)
utils/generate-dummy-bitnet-model.py:796
Method
set_vocab
(self)
utils/convert-hf-to-gguf-bitnet.py:686
Method
set_vocab
(self)
utils/convert-hf-to-gguf-bitnet.py:959
Method
set_vocab
(self)
utils/generate-dummy-bitnet-model.py:793
Function
signal_handler
(sig, frame)
setup_env.py:235
Function
signal_handler
(sig, frame)
run_inference_server.py:46
Function
signal_handler
(sig, frame)
run_inference.py:39
Method
to_ggml
(self)
utils/convert-ms-to-gguf-bitnet.py:796
Method
to_ggml
(self)
utils/convert.py:796
Function
top_p
Perform top-p (nucleus) sampling on a probability distribution. Args: probs (torch.Tensor): probability distribution tensor.
gpu/sample_utils.py:9
Method
trim_answer
Trim the answer to end it on an eos token.
gpu/generate.py:290
Method
write_tensors
(self)
utils/convert-hf-to-gguf-bitnet.py:708
Method
write_tensors
(self)
utils/convert-hf-to-gguf-bitnet.py:986
Method
write_tensors
(self)
utils/generate-dummy-bitnet-model.py:861
← previous
301–397 of 397, ranked by callers