Instructions to use surogate/amami-357m-ro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use surogate/amami-357m-ro with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use surogate/amami-357m-ro with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf surogate/amami-357m-ro # Run inference directly in the terminal: llama cli -hf surogate/amami-357m-ro
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf surogate/amami-357m-ro # Run inference directly in the terminal: llama cli -hf surogate/amami-357m-ro
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf surogate/amami-357m-ro # Run inference directly in the terminal: ./build/bin/llama cli -hf surogate/amami-357m-ro
Use Docker
docker model run hf.co/surogate/amami-357m-ro
- Llama new
- LM Studio
- Jan
- Ollama
How to use surogate/amami-357m-ro with Ollama:
ollama run hf.co/surogate/amami-357m-ro
- Unsloth Desktop
- Docker Model Runner
How to use surogate/amami-357m-ro with Docker Model Runner:
docker model run hf.co/surogate/amami-357m-ro
- Lemonade
How to use surogate/amami-357m-ro with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull surogate/amami-357m-ro
Run and chat with the model
lemonade run user.amami-357m-ro-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Download gpu/longform_context_cache.h from surogate/amami-357m-ro: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/surogate/amami-357m-ro/resolve/main/gpu/longform_context_cache.h
- Command line
-
hf download hf://surogate/amami-357m-ro/gpu/longform_context_cache.h
-
curl -L -o longform_context_cache.h https://huggingface.co/surogate/amami-357m-ro/resolve/main/gpu/longform_context_cache.h
1.27 kB
| // SPDX-License-Identifier: Apache-2.0 | |
| namespace nemo_speech::tts { | |
| // Retain previous encoder outputs across short windows. A later chunk may need | |
| // more history than the immediately preceding window happened to contain. | |
| inline bool append_longform_text_context( | |
| const std::vector<float>& text_context, int text_len, int current_chunk_len, | |
| int n_embd, int max_history_tokens, std::vector<float>& history) { | |
| if (n_embd <= 0 || max_history_tokens <= 0 || current_chunk_len < 0 || | |
| text_len < current_chunk_len || | |
| text_context.size() != static_cast<size_t>(text_len) * n_embd || | |
| history.size() % n_embd != 0) { | |
| return false; | |
| } | |
| const size_t maximum = static_cast<size_t>(max_history_tokens) * n_embd; | |
| const size_t added = static_cast<size_t>(current_chunk_len) * n_embd; | |
| if (added >= maximum) { | |
| history.assign(text_context.end() - maximum, text_context.end()); | |
| } else { | |
| const size_t keep = maximum - added; | |
| if (history.size() > keep) history.erase(history.begin(), history.end() - keep); | |
| history.insert(history.end(), text_context.end() - added, text_context.end()); | |
| } | |
| return true; | |
| } | |
| } // namespace nemo_speech::tts | |