Text Generation
Transformers
GGUF
MLX
Japanese
asr-error-correction
japanese
whisper
phonetics
constrained-decoding
on-device
text2text-generation
Instructions to use NagaYu/mondegreen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NagaYu/mondegreen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NagaYu/mondegreen")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NagaYu/mondegreen", device_map="auto") - MLX
How to use NagaYu/mondegreen with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("NagaYu/mondegreen") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use NagaYu/mondegreen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NagaYu/mondegreen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NagaYu/mondegreen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NagaYu/mondegreen
- SGLang
How to use NagaYu/mondegreen with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NagaYu/mondegreen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NagaYu/mondegreen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NagaYu/mondegreen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NagaYu/mondegreen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - MLX LM
How to use NagaYu/mondegreen with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "NagaYu/mondegreen" --prompt "Once upon a time"
- Docker Model Runner
How to use NagaYu/mondegreen with Docker Model Runner:
docker model run hf.co/NagaYu/mondegreen
- Atomic Chat
| { | |
| "version": 1, | |
| "kind": "logistic", | |
| "features": [ | |
| "norm_distance", | |
| "margin", | |
| "exact_reading_match", | |
| "span_morae", | |
| "term_morae", | |
| "mora_ratio", | |
| "span_chars", | |
| "n_candidates", | |
| "unknown_ratio", | |
| "reading_ambiguity", | |
| "log_term_weight", | |
| "span_has_kanji", | |
| "span_has_katakana", | |
| "span_all_hiragana", | |
| "span_is_glossary_surface", | |
| "span_is_common_word", | |
| "span_is_proper_noun", | |
| "boundary_left", | |
| "boundary_right", | |
| "lm_delta" | |
| ], | |
| "weights": [ | |
| -1.236312684512737, | |
| 0.48721441497362894, | |
| 0.3662493098626638, | |
| 0.12309106100638274, | |
| 0.05894192373282612, | |
| 0.5167039483274594, | |
| 0.09026522247401973, | |
| -0.19252786761995272, | |
| -0.3270157178704295, | |
| 0.0, | |
| -0.7349845615275823, | |
| -0.02512550845331862, | |
| 0.7002502572081454, | |
| 0.0, | |
| 0.0, | |
| 0.4644144469027838, | |
| 0.6173376220372168, | |
| -0.008701139439452502, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "bias": 3.2366898341444874, | |
| "threshold": 0.82, | |
| "platt": [ | |
| 0.8113781764914337, | |
| 0.7707739984152188 | |
| ], | |
| "mean": [ | |
| 0.03960451932561941, | |
| 0.9123938409993783, | |
| 0.22150882825040127, | |
| 6.565008025682183, | |
| 6.287319422150883, | |
| 1.0574542721412703, | |
| 6.306581059390048, | |
| 1.0963081861958266, | |
| 0.00012347203358439315, | |
| 1.0, | |
| 0.7083469767833914, | |
| 0.27447833065810595, | |
| 0.8073836276083467, | |
| 0.0, | |
| 0.0, | |
| 0.6099518459069021, | |
| 0.31942215088282505, | |
| 0.5313001605136437, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "scale": [ | |
| 0.0497173741272883, | |
| 0.27118877658796603, | |
| 0.41526216689885836, | |
| 2.445265079315896, | |
| 2.39969561453776, | |
| 0.14360356185020293, | |
| 2.9052570432596982, | |
| 0.30040504712919075, | |
| 0.0030793836062081516, | |
| 1.0, | |
| 0.05622254163233332, | |
| 0.44625102426464763, | |
| 0.394354289286087, | |
| 1.0, | |
| 1.0, | |
| 0.4877607934035533, | |
| 0.46625276450463404, | |
| 0.4990193382543619, | |
| 1.0, | |
| 1.0 | |
| ], | |
| "metadata": { | |
| "training": { | |
| "n_train": 623, | |
| "n_positive": 730, | |
| "accuracy": 0.9566265060240964, | |
| "auc": 0.9847945205479453, | |
| "log_loss": 0.12524717221001125, | |
| "ece": 0.05253578460489156, | |
| "platt": [ | |
| 0.8113781764914337, | |
| 0.7707739984152188 | |
| ], | |
| "feature_weights": { | |
| "norm_distance": -1.236312684512737, | |
| "margin": 0.48721441497362894, | |
| "exact_reading_match": 0.3662493098626638, | |
| "span_morae": 0.12309106100638274, | |
| "term_morae": 0.05894192373282612, | |
| "mora_ratio": 0.5167039483274594, | |
| "span_chars": 0.09026522247401973, | |
| "n_candidates": -0.19252786761995272, | |
| "unknown_ratio": -0.3270157178704295, | |
| "reading_ambiguity": 0.0, | |
| "log_term_weight": -0.7349845615275823, | |
| "span_has_kanji": -0.02512550845331862, | |
| "span_has_katakana": 0.7002502572081454, | |
| "span_all_hiragana": 0.0, | |
| "span_is_glossary_surface": 0.0, | |
| "span_is_common_word": 0.4644144469027838, | |
| "span_is_proper_noun": 0.6173376220372168, | |
| "boundary_left": -0.008701139439452502, | |
| "boundary_right": 0.0, | |
| "lm_delta": 0.0 | |
| } | |
| } | |
| } | |
| } |