Instructions to use Hacht/CapCapResource with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Hacht/CapCapResource with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Hacht/CapCapResource", filename="Hy-MT2-1.8B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Hacht/CapCapResource with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Hacht/CapCapResource:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Hacht/CapCapResource:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Hacht/CapCapResource:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Hacht/CapCapResource:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Hacht/CapCapResource:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Hacht/CapCapResource:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Hacht/CapCapResource:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Hacht/CapCapResource:Q4_K_M
Use Docker
docker model run hf.co/Hacht/CapCapResource:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Hacht/CapCapResource with Ollama:
ollama run hf.co/Hacht/CapCapResource:Q4_K_M
- Unsloth Studio new
How to use Hacht/CapCapResource with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Hacht/CapCapResource to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Hacht/CapCapResource to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Hacht/CapCapResource to start chatting
- Pi new
How to use Hacht/CapCapResource with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Hacht/CapCapResource:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Hacht/CapCapResource:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Hacht/CapCapResource with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Hacht/CapCapResource:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Hacht/CapCapResource:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Hacht/CapCapResource with Docker Model Runner:
docker model run hf.co/Hacht/CapCapResource:Q4_K_M
- Lemonade
How to use Hacht/CapCapResource with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Hacht/CapCapResource:Q4_K_M
Run and chat with the model
lemonade run user.CapCapResource-Q4_K_M
List all available models
lemonade list
Upload 10 files
Browse files- checkpoints/vocos-mel-24khz/.cache/huggingface/.gitignore +1 -0
- checkpoints/vocos-mel-24khz/.cache/huggingface/CACHEDIR.TAG +4 -0
- checkpoints/vocos-mel-24khz/.cache/huggingface/download/.gitattributes.metadata +3 -0
- checkpoints/vocos-mel-24khz/.cache/huggingface/download/README.md.metadata +3 -0
- checkpoints/vocos-mel-24khz/.cache/huggingface/download/config.yaml.metadata +3 -0
- checkpoints/vocos-mel-24khz/.cache/huggingface/download/pytorch_model.bin.metadata +3 -0
- checkpoints/vocos-mel-24khz/.gitattributes +34 -0
- checkpoints/vocos-mel-24khz/README.md +71 -0
- checkpoints/vocos-mel-24khz/config.yaml +24 -0
- checkpoints/vocos-mel-24khz/pytorch_model.bin +3 -0
checkpoints/vocos-mel-24khz/.cache/huggingface/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
*
|
checkpoints/vocos-mel-24khz/.cache/huggingface/CACHEDIR.TAG
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Signature: 8a477f597d28d172789f06886806bc55
|
| 2 |
+
# This file is a cache directory tag created by huggingface_hub.
|
| 3 |
+
# For information about cache directory tags, see:
|
| 4 |
+
# https://bford.info/cachedir/
|
checkpoints/vocos-mel-24khz/.cache/huggingface/download/.gitattributes.metadata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
0feb3fdd929bcd6649e0e7c5a688cf7dd012ef21
|
| 2 |
+
c7d9f3332a950355d5a77d85000f05e6f45435ea
|
| 3 |
+
1777101731.6057262
|
checkpoints/vocos-mel-24khz/.cache/huggingface/download/README.md.metadata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
0feb3fdd929bcd6649e0e7c5a688cf7dd012ef21
|
| 2 |
+
226bd9452b8561a28a5633a4e1576e883984cc5f
|
| 3 |
+
1777101731.7599757
|
checkpoints/vocos-mel-24khz/.cache/huggingface/download/config.yaml.metadata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
0feb3fdd929bcd6649e0e7c5a688cf7dd012ef21
|
| 2 |
+
538262138a8b43863802f279909f26ec31c766b3
|
| 3 |
+
1777101731.71311
|
checkpoints/vocos-mel-24khz/.cache/huggingface/download/pytorch_model.bin.metadata
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
0feb3fdd929bcd6649e0e7c5a688cf7dd012ef21
|
| 2 |
+
97ec976ad1fd67a33ab2682d29c0ac7df85234fae875aefcc5fb215681a91b2a
|
| 3 |
+
1777101731.6661804
|
checkpoints/vocos-mel-24khz/.gitattributes
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
checkpoints/vocos-mel-24khz/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis
|
| 6 |
+
|
| 7 |
+
[Audio samples](https://charactr-platform.github.io/vocos/) |
|
| 8 |
+
Paper [[abs]](https://arxiv.org/abs/2306.00814) [[pdf]](https://arxiv.org/pdf/2306.00814.pdf)
|
| 9 |
+
|
| 10 |
+
Vocos is a fast neural vocoder designed to synthesize audio waveforms from acoustic features. Trained using a Generative
|
| 11 |
+
Adversarial Network (GAN) objective, Vocos can generate waveforms in a single forward pass. Unlike other typical
|
| 12 |
+
GAN-based vocoders, Vocos does not model audio samples in the time domain. Instead, it generates spectral
|
| 13 |
+
coefficients, facilitating rapid audio reconstruction through inverse Fourier transform.
|
| 14 |
+
|
| 15 |
+
## Installation
|
| 16 |
+
|
| 17 |
+
To use Vocos only in inference mode, install it using:
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install vocos
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
If you wish to train the model, install it with additional dependencies:
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
pip install vocos[train]
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
## Usage
|
| 30 |
+
|
| 31 |
+
### Reconstruct audio from mel-spectrogram
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import torch
|
| 35 |
+
|
| 36 |
+
from vocos import Vocos
|
| 37 |
+
|
| 38 |
+
vocos = Vocos.from_pretrained("charactr/vocos-mel-24khz")
|
| 39 |
+
|
| 40 |
+
mel = torch.randn(1, 100, 256) # B, C, T
|
| 41 |
+
audio = vocos.decode(mel)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Copy-synthesis from a file:
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
import torchaudio
|
| 48 |
+
|
| 49 |
+
y, sr = torchaudio.load(YOUR_AUDIO_FILE)
|
| 50 |
+
if y.size(0) > 1: # mix to mono
|
| 51 |
+
y = y.mean(dim=0, keepdim=True)
|
| 52 |
+
y = torchaudio.functional.resample(y, orig_freq=sr, new_freq=24000)
|
| 53 |
+
y_hat = vocos(y)
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
## Citation
|
| 57 |
+
|
| 58 |
+
If this code contributes to your research, please cite our work:
|
| 59 |
+
|
| 60 |
+
```
|
| 61 |
+
@article{siuzdak2023vocos,
|
| 62 |
+
title={Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis},
|
| 63 |
+
author={Siuzdak, Hubert},
|
| 64 |
+
journal={arXiv preprint arXiv:2306.00814},
|
| 65 |
+
year={2023}
|
| 66 |
+
}
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## License
|
| 70 |
+
|
| 71 |
+
The code in this repository is released under the MIT license.
|
checkpoints/vocos-mel-24khz/config.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
feature_extractor:
|
| 2 |
+
class_path: vocos.feature_extractors.MelSpectrogramFeatures
|
| 3 |
+
init_args:
|
| 4 |
+
sample_rate: 24000
|
| 5 |
+
n_fft: 1024
|
| 6 |
+
hop_length: 256
|
| 7 |
+
n_mels: 100
|
| 8 |
+
padding: center
|
| 9 |
+
|
| 10 |
+
backbone:
|
| 11 |
+
class_path: vocos.models.VocosBackbone
|
| 12 |
+
init_args:
|
| 13 |
+
input_channels: 100
|
| 14 |
+
dim: 512
|
| 15 |
+
intermediate_dim: 1536
|
| 16 |
+
num_layers: 8
|
| 17 |
+
|
| 18 |
+
head:
|
| 19 |
+
class_path: vocos.heads.ISTFTHead
|
| 20 |
+
init_args:
|
| 21 |
+
dim: 512
|
| 22 |
+
n_fft: 1024
|
| 23 |
+
hop_length: 256
|
| 24 |
+
padding: center
|
checkpoints/vocos-mel-24khz/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97ec976ad1fd67a33ab2682d29c0ac7df85234fae875aefcc5fb215681a91b2a
|
| 3 |
+
size 54365991
|