Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/kyutai-labs/moshi
/ functions
Functions
664 in github.com/kyutai-labs/moshi
⨍
Functions
664
◇
Types & classes
120
↳
Endpoints
4
↓ 73 callers
Method
log
(self, level: str, msg: str)
moshi/moshi/client_utils.py:193
↓ 32 callers
Function
log
Log something with a given level.
moshi/moshi/client_utils.py:29
↓ 24 callers
Method
cat
(conditions: list['WavCondition'])
moshi/moshi/conditioners/base.py:63
↓ 22 callers
Function
hf_hub_download
(repo, path: str)
moshi_mlx/moshi_mlx/local.py:31
↓ 21 callers
Method
decode
Decode the given codes to a reconstructed representation. Args: codes (torch.Tensor): Int tensor of shape [B, K, T] Retu
moshi/moshi/models/compression.py:395
↓ 20 callers
Function
log
(level: str, msg: str)
moshi_mlx/moshi_mlx/local_web.py:42
↓ 18 callers
Method
encode
Encode the given input tensor to quantized representation. Args: x (torch.Tensor): Float tensor of shape [B, C, T] Retur
moshi/moshi/models/compression.py:365
↓ 15 callers
Method
add
(self, msg: str, color: str | None = None)
moshi/moshi/client_utils.py:85
↓ 14 callers
Method
add
(self, msg: str, color: str | None = None)
moshi_mlx/moshi_mlx/client_utils.py:78
↓ 11 callers
Function
log
(level: str, msg: str)
moshi_mlx/moshi_mlx/run_inference.py:21
↓ 11 callers
Method
streaming
Context manager to enter streaming mode. Reset streaming state on exit.
moshi/moshi/modules/streaming.py:112
↓ 10 callers
Method
currentSamples
()
client/src/audio-processor.ts:109
↓ 9 callers
Function
asSamples
(mili)
client/src/audio-processor.ts:6
↓ 9 callers
Method
start
()
client/src/audio-processor.ts:122
↓ 8 callers
Function
asMs
(samples)
client/src/audio-processor.ts:2
↓ 8 callers
Method
flush
(self)
moshi/moshi/client_utils.py:119
↓ 7 callers
Method
log
(self, level: str, msg: str)
moshi_mlx/moshi_mlx/client_utils.py:39
↓ 6 callers
Method
__init__
(self)
moshi_mlx/moshi_mlx/modules/transformer.py:42
↓ 6 callers
Function
abort
(what)
client/public/assets/decoderWorker.min.js:594
↓ 6 callers
Method
flush
(self)
moshi_mlx/moshi_mlx/client_utils.py:112
↓ 6 callers
Function
getMimeType
(type: "audio" | "video")
client/src/pages/Conversation/getMimeType.ts:55
↓ 6 callers
Function
hf_get
(filename: str | Path, hf_repo: str | None = None)
moshi/moshi/models/loaders.py:111
↓ 6 callers
Function
hf_hub_download
(repo, path: str)
moshi_mlx/moshi_mlx/local_web.py:54
↓ 6 callers
Method
step
(self, input_tokens: torch.Tensor)
moshi/moshi/models/lm.py:461
↓ 6 callers
Function
useSocketContext
()
client/src/pages/Conversation/SocketContext.ts:16
↓ 6 callers
Function
zero_scalar
Returns a 0. value on the given device without introducing a synchronization point.
moshi/moshi/quantization/core_vq.py:86
↓ 5 callers
Method
__init__
( self, dim: int, eps: float = 1e-5, dtype: tp.Optional[torch.dtype] = None,
moshi/moshi/modules/transformer.py:59
↓ 5 callers
Method
__init__
(self, seed: int = 1234)
moshi/moshi/conditioners/base.py:271
↓ 5 callers
Method
_apply_named_streaming
(self, fn: tp.Any)
moshi/moshi/modules/streaming.py:74
↓ 5 callers
Function
colorize
(text, color)
moshi/moshi/client_utils.py:11
↓ 5 callers
Function
colorize
(text, color)
moshi_mlx/moshi_mlx/client_utils.py:9
↓ 5 callers
Method
device
(self)
moshi/moshi/models/lm.py:265
↓ 5 callers
Method
last_audio_tokens
(self)
moshi_mlx/moshi_mlx/models/generate.py:103
↓ 5 callers
Function
log
(s)
moshi_mlx/moshi_mlx/local.py:92
↓ 5 callers
Method
newline
(self)
moshi/moshi/client_utils.py:110
↓ 5 callers
Method
newline
(self)
moshi_mlx/moshi_mlx/client_utils.py:103
↓ 5 callers
Method
run
(self)
moshi/moshi/client.py:137
↓ 5 callers
Method
timestamp
()
client/src/audio-processor.ts:105
↓ 4 callers
Method
__init__
( self, *args, causal: bool = False, norm: str = "none", norm_kwargs:
moshi/moshi/modules/conv.py:116
↓ 4 callers
Method
_trim
(self, trim_size, v, append=None)
moshi_mlx/moshi_mlx/modules/kv_cache.py:80
↓ 4 callers
Function
create_norm_fn
Create normalization module for transformer encoder layer. Args: norm_type (str): Normalization method. dim (int): Dimension of t
moshi/moshi/modules/transformer.py:112
↓ 4 callers
Method
decode
Given a tensor of codes of shape `[*]`, returns a tensor of shape `[*, D]`, corresponding to the centroids associated to each code index.
moshi/moshi/quantization/core_vq.py:271
↓ 4 callers
Function
decodeMessage
(data: Uint8Array)
client/src/protocol/encoder.ts:37
↓ 4 callers
Method
forward
(self, x: torch.Tensor, y: torch.Tensor)
moshi/moshi/modules/streaming.py:178
↓ 4 callers
Function
function
(obj, indent: str, text_signature: str = None)
rust/mimi-pyo3/stub.py:26
↓ 4 callers
Function
getFloatFromStorage
(val: string | null)
client/src/pages/Queue/Queue.tsx:12
↓ 4 callers
Function
getIntFromStorage
(val: string | null)
client/src/pages/Queue/Queue.tsx:16
↓ 4 callers
Method
get_mimi
(self, device: torch.device | str = 'cpu')
moshi/moshi/models/loaders.py:202
↓ 4 callers
Function
hf_get
(filename: str)
moshi_mlx/moshi_mlx/run_inference.py:25
↓ 4 callers
Function
multinomial
torch.multinomial with arbitrary number of dimensions, and number of candidates on the last dimension. Args: input (torch.Tensor): The in
moshi/moshi/utils/sampling.py:15
↓ 4 callers
Method
step
(self, other_audio_tokens: mx.array, ct: ConditionTensor | None = None)
moshi_mlx/moshi_mlx/models/generate.py:57
↓ 4 callers
Method
streaming_forever
(self, batch_size: int)
moshi/moshi/modules/streaming.py:109
↓ 3 callers
Method
__init__
(self, cfg: LmConfig)
moshi_mlx/moshi_mlx/models/lm.py:223
↓ 3 callers
Method
_remove_pending
(self)
moshi/moshi/client_utils.py:142
↓ 3 callers
Method
_remove_pending
(self)
moshi_mlx/moshi_mlx/client_utils.py:135
↓ 3 callers
Function
_sample_vectors
(samples: torch.Tensor, num: int)
moshi/moshi/quantization/core_vq.py:38
↓ 3 callers
Function
callRuntimeCallbacks
(callbacks)
client/public/assets/decoderWorker.min.js:727
↓ 3 callers
Function
colorize
(text, color)
moshi_mlx/moshi_mlx/local_web.py:36
↓ 3 callers
Method
condition_types
()
moshi/moshi/conditioners/base.py:140
↓ 3 callers
Method
copy
(self)
moshi/moshi/conditioners/base.py:143
↓ 3 callers
Method
decode_latent
Decode from the discrete codes to continuous latent space.
moshi/moshi/models/compression.py:418
↓ 3 callers
Method
erase
(self, count: int = 1)
moshi/moshi/client_utils.py:97
↓ 3 callers
Method
erase
(self, count: int = 1)
moshi_mlx/moshi_mlx/client_utils.py:90
↓ 3 callers
Method
from_hf_repo
Downloads the checkpoints from the given repo, along with its config. Extra overrides are possible for each of Moshi, Mimi, or the text token
moshi/moshi/models/loaders.py:147
↓ 3 callers
Function
getExtension
(type: "audio" | "video")
client/src/pages/Conversation/getMimeType.ts:62
↓ 3 callers
Method
get_moshi
(self, strict: bool = True, device: torch.device | str = 'cpu')
moshi/moshi/models/loaders.py:209
↓ 3 callers
Function
is_quantized
(module: nn.Module, name: str = 'weight')
moshi/moshi/utils/quantize.py:90
↓ 3 callers
Function
pad1d
Tiny wrapper around F.pad, just to allow for reflect padding on small input. If this is the case, we insert extra 0 padding to the right before th
moshi/moshi/modules/conv.py:77
↓ 3 callers
Method
prepare
(self, x: tp.List[tp.Optional[str]])
moshi/moshi/conditioners/text.py:123
↓ 3 callers
Function
quantize_transformer
(module: torch.nn.Module)
moshi/moshi/modules/transformer.py:28
↓ 3 callers
Function
r
(s)
client/public/assets/decoderWorker.min.js:13
↓ 3 callers
Method
render
(self)
moshi/moshi/client_utils.py:62
↓ 3 callers
Method
reset_streaming
Reset the streaming state.
moshi/moshi/modules/streaming.py:120
↓ 3 callers
Method
sample
( self, text_token_ids: mx.array, audio_token_ids: list[mx.array], text_sample
moshi_mlx/moshi_mlx/models/lm.py:270
↓ 3 callers
Method
warmup
(self)
moshi/moshi/server.py:64
↓ 3 callers
Method
warmup
(self, ct: ConditionTensor | None)
moshi_mlx/moshi_mlx/models/lm.py:304
↓ 2 callers
Function
UTF8ArrayToString
(heap, idx, maxBytesToRead)
client/public/assets/decoderWorker.min.js:473
↓ 2 callers
Method
__init__
( self, channels: int = 1, dimension: int = 128, n_filters: int = 32,
moshi/moshi/modules/seanet.py:128
↓ 2 callers
Method
__init__
(self)
moshi/moshi/modules/streaming.py:55
↓ 2 callers
Method
__init__
( self, dim: int, codebook_size: int, decay: float = 0.99, epsilon: fl
moshi/moshi/quantization/core_vq.py:115
↓ 2 callers
Method
__init__
( self, lm_model: LMModel, use_sampling: bool = True, temp: float = 0.8,
moshi/moshi/models/lm.py:392
↓ 2 callers
Method
_broadcast_buffers
(self)
moshi/moshi/quantization/core_vq.py:206
↓ 2 callers
Function
_ema_inplace
(moving_avg: torch.Tensor, new: torch.Tensor, decay: float)
moshi/moshi/quantization/core_vq.py:34
↓ 2 callers
Method
_encode_to_unquantized_latent
Projects a batch of waveforms to unquantized latent space. Args: x (torch.Tensor): Float tensor of shape [B, C, T]. Retu
moshi/moshi/models/compression.py:341
↓ 2 callers
Function
_is_cuda_graph_enabled
()
moshi/moshi/utils/compile.py:168
↓ 2 callers
Function
_is_distributed
()
moshi/moshi/quantization/core_vq.py:58
↓ 2 callers
Function
_is_safetensors
(path: Path | str)
moshi/moshi/models/loaders.py:216
↓ 2 callers
Method
_lost_connection
(self)
moshi/moshi/client.py:117
↓ 2 callers
Method
_quantize
(self, x: torch.Tensor)
moshi/moshi/quantization/core_vq.py:252
↓ 2 callers
Method
_rearrange_input
(self, x)
moshi/moshi/quantization/core_vq.py:381
↓ 2 callers
Method
_rearrange_output
(self, quantized)
moshi/moshi/quantization/core_vq.py:385
↓ 2 callers
Method
_renorm_and_add
Renormalizes values from `rvq_first` and `rvq_rest` and adds them. This allows correcting statistics that are normalized by the number of qua
moshi/moshi/quantization/vq.py:202
↓ 2 callers
Method
_reshape_codes
(self, codes: torch.Tensor, shape: torch.Size)
moshi/moshi/quantization/core_vq.py:249
↓ 2 callers
Method
_reshape_input
(self, x: torch.Tensor)
moshi/moshi/quantization/core_vq.py:244
↓ 2 callers
Method
_to_encoder_framerate
(self, x: torch.Tensor)
moshi/moshi/models/compression.py:274
↓ 2 callers
Method
_to_framerate
(self, x: torch.Tensor)
moshi/moshi/models/compression.py:261
↓ 2 callers
Function
apply_parametrization_norm
(module: nn.Module, norm: str = "none")
moshi/moshi/modules/conv.py:40
↓ 2 callers
Method
canPlay
()
client/src/audio-processor.ts:128
↓ 2 callers
Function
clamp
(value: number, min: number, max: number)
client/src/pages/Conversation/hooks/audioUtils.ts:1
↓ 2 callers
Function
convertMinSecs
(total_secs: number)
client/src/pages/Conversation/components/ServerAudio/ServerAudioStats.tsx:23
next →
1–100 of 664, ranked by callers