File size: 3,306 Bytes
35d23e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4514b3d
35d23e6
4514b3d
 
 
 
 
 
 
 
 
 
35d23e6
 
 
4514b3d
35d23e6
4514b3d
 
35d23e6
4514b3d
 
 
 
 
 
 
35d23e6
 
 
4514b3d
 
 
 
 
 
 
 
 
35d23e6
34aec2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
library_name: transformers
model_index:
- name: Lance ASR
  results: []
tags:
- automatic-speech-recognition
- asr
- pytorch
- transformer
license: apache-2.0
---

# Lance ASR – The Foundation of Speech Intelligence

πŸš€ **Lance ASR** is a custom-built Automatic Speech Recognition (ASR) model designed for high-efficiency local and cloud inference. It utilizes a Transformer Encoder-Decoder architecture with convolutional subsampling for processing acoustic features.

## 🌟 Key Features

βœ… **Custom Architecture**: Not a Whisper clone; features a bespoke Conv1d-subsampling audio front-end.
βœ… **Hugging Face Compatible**: Fully integrates with `transformers` via `AutoModelForSeq2SeqLM`.
βœ… **Optimized for Precision**: Uses `bfloat16` for high-performance inference and training.
βœ… **Scalable Design**: Optimized for 768 hidden dims and 4 layers, balancing speed and accuracy.
βœ… **Seamless Tokenization**: Uses the `DWDMaiMai/tiktoken_cl100k_base` tokenizer for efficient text representation.

---

## πŸ“₯ Installation & Setup

Load Lance ASR directly from your local directory or the Hugging Face Hub:

```python
import torch
from transformers import AutoTokenizer, AutoFeatureExtractor, AutoModelForSeq2SeqLM

model_name = "NeuraCraft/Lance-ASR"
tokenizer = AutoTokenizer.from_pretrained(model_name)
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
```

---

## πŸ›  Usage Example

Lance ASR can transcribe audio by processing log-mel spectrograms:

```python
# 1. Prepare audio features (e.g., from a .wav file)
# inputs = feature_extractor(audio_array, sampling_rate=16000, return_tensors="pt")

# 2. Generate transcription
model.eval()
with torch.no_grad():
    generated_ids = model.generate(
        inputs.input_features.to(torch.bfloat16),
        max_new_tokens=250,
        pad_token_id=tokenizer.eos_token_id
    )

transcription = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
print(f"Transcription: {transcription}")
```

---

πŸ“Š Performance & Evaluation

Lance ASR is currently in its early stages, and performance is being actively tested. Initial evaluations focus on:
πŸ”Ή **WER (Word Error Rate)** – Measures transcription accuracy
πŸ”Ή **CER (Character Error Rate)** – Measures character-level precision
πŸ”Ή **Inference Latency** – Optimized for real-time local processing

βœ… Planned Enhancements

πŸ”Ή Larger training datasets (e.g., Common Voice, LibriSpeech)
πŸ”Ή Advanced noise-robustness for real-world environments
πŸ”Ή Multilingual ASR support for global accessibility

---

πŸš€ Future Roadmap

Lance ASR is just getting started! The goal is to transform it into the core auditory component of an advanced AI assistant.
πŸ“… Planned Features:

πŸ”œ Real-time live transcription & streaming support

πŸ”œ Multi-speaker identification (Diarization)

πŸ”œ Integrated Voice Activity Detection (VAD)

πŸ”œ High-efficiency deployment for mobile and edge devices

---

πŸ— Development & Contributions

Lance ASR is being developed by **NeuraCraft**. Contributions, suggestions, and testing feedback are welcome!

πŸ“¬ Contact & Updates:

Developer: NeuraCraft

Project Status: 🚧 In Development

Follow for updates: Coming soon