Text Generation
MLX
English
German
next-concept-modeling
apple-silicon
diffusion-lm
research-code
negative-results
Instructions to use Red-fuchs/ncm-modular with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Red-fuchs/ncm-modular 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("Red-fuchs/ncm-modular") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use Red-fuchs/ncm-modular with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Red-fuchs/ncm-modular" --prompt "Once upon a time"
- Atomic Chat
Download src/ncm_modular/paths.py from Red-fuchs/ncm-modular: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/Red-fuchs/ncm-modular/resolve/main/src/ncm_modular/paths.py
- Command line
-
hf download hf://Red-fuchs/ncm-modular/src/ncm_modular/paths.py
-
curl -L -o paths.py https://huggingface.co/Red-fuchs/ncm-modular/resolve/main/src/ncm_modular/paths.py
1.02 kB
| """Work-dir layout. Everything heavy (checkpoints, caches, runs) lives under NCM_WORK (default ./w), never in the repo. | |
| $NCM_WORK/up/<task>/{config.yaml,tokenizer.pt} official torch checkpoints (xsum, wmt14) | |
| $NCM_WORK/mlx/<task>/{codec.safetensors,spec.json} converted MLX codecs | |
| $NCM_WORK/tok/{gpt2,Qwen3-0.6B} HF tokenizers | |
| $NCM_WORK/ts/ official TinyStories checkpoint converted by `python -m ncm_mlx official convert` | |
| $NCM_WORK/seam_data, $NCM_WORK/seam_runs seam experiment data / outputs | |
| NCM_UPSTREAM = checkout of github.com/HazyResearch/ncm (only for convert.py / ref_dump.py / parity refs)""" | |
| import os | |
| WORK = W = os.environ.get("NCM_WORK", "w") | |
| UPSTREAM = os.environ.get("NCM_UPSTREAM", "upstream") | |
| DATA = os.environ.get("NCM_SEAM_DATA", f"{W}/seam_data") | |
| RUNS = os.environ.get("NCM_SEAM_RUNS", f"{W}/seam_runs") | |
| JUDGE_MODEL = os.environ.get("NCM_JUDGE_MODEL", "LiquidAI/LFM2-1.2B") # any mlx_lm-loadable LM (path or HF id) | |