Skip to content

Support for AI4Bharat IndicConformer Models #47

Description

@bhusha-n

Feature Description

Please add support for AI4Bharat IndicConformer models.

Currently loading the GGUF model crashes during the feature downsampling/subsampling block.

Error

GGML_ASSERT(a->ne[2] == 1) failed

Stack:
ggml_conv_2d_dw_direct()
Subsampling::build_graph()

Root Cause

The current implementation assumes FastConformer subsampling:

conv.2 depthwise
conv.3 pointwise
conv.5 depthwise
conv.6 pointwise

However AI4Bharat IndicConformer uses:

conv.0 Conv2d
ReLU
conv.2 Conv2d
ReLU

ONNX inspection:

conv.0.weight
[512,1,3,3]
group=1

conv.2.weight
[512,512,3,3]
group=1

GGUF:

encoder.pre_encode.conv.2.weight
[3,3,512,512]

This is a different computation graph, not only a tensor layout issue.

Proposed implementation

  1. Detect subsampling architecture during loading.

  2. Preserve existing FastConformer depthwise path.

  3. Add IndicConformer path:

Conv2d(conv.0)
→ ReLU
→ Conv2d(conv.2)
→ ReLU

using ggml_conv_2d().

  1. Reuse existing encoder blocks after subsampling.

Additional observation

The GGUF file itself is valid:

  • parakeet-cli info works correctly.
  • parakeet-cli quantize works correctly.

The failure only occurs during parakeet-cli transcribe, when the inference graph is constructed and the subsampling layer is executed.

Use Case

Standalone C++ Speech-to-Text inference for Indian languages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions