Instructions to use MuyaoYuan/LoCo-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuyaoYuan/LoCo-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MuyaoYuan/LoCo-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MuyaoYuan/LoCo-7B") model = AutoModelForCausalLM.from_pretrained("MuyaoYuan/LoCo-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MuyaoYuan/LoCo-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MuyaoYuan/LoCo-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuyaoYuan/LoCo-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MuyaoYuan/LoCo-7B
- SGLang
How to use MuyaoYuan/LoCo-7B 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 "MuyaoYuan/LoCo-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuyaoYuan/LoCo-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "MuyaoYuan/LoCo-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MuyaoYuan/LoCo-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MuyaoYuan/LoCo-7B with Docker Model Runner:
docker model run hf.co/MuyaoYuan/LoCo-7B
Este atlas está muy LoCo: asking what makes LoCo loco
I was scrolling models to do some mechanistic interpretations on. Sometimes I make an educated decision. Other times I choose models on a whim. I use the word loco on a daily basis so I couldn't pass up the opportunity. I built an activation atlas of LoCo-7B using Cartographics, a space that maps what’s going on inside models on HF. It doesn’t test the reasoning compression itself; it’s a map of how the model organizes general prompts internally. If you’re thinking about steering, probing or editing it, the most readable region is the early-middle MLP: usage categories read at 79.11% at layer 9, with layers 10, 11 and 13 all above 77%. So here is the atlas that no one asks for but occasionally end up enjoying. If anything I cover in the atlas's interpretation comes as a shock, or is insightful and something you use in the future please share it with me! I love to hear feed back from the people building the models I'm looking at daily. If the space looks like something you think would be useful to other users a like truly goes a very long way. And if you were looking for more then the atlas had to offer at the end I a developing new causal modules for the atlas and would happily run a deeper atlas than I am presenting you with today. I hope you enjoy it! 🍻
LoCo-7B: a reasoning-compression tune of DeepSeek-R1-Distill-Qwen-7B through a general prompt census
I ran the LoCo-7B model through the Cartographics HF space (a space that generates the model atlases referenced throughout this article, on demand). The developers describe LoCo-7B as a reasoning-compression tune of DeepSeek-R1-Distill-Qwen-7B: preference pairs built from the model's own mathematical traces teach it, through DPO, when a chain of thought has enough information to conclude, with reported completion-length cuts of 41.7 to 45.4% on mathematics and 23.4 to 36.3% on code at maintained or improved accuracy. This census asks a different question: where the tuned model's general usage-category organization lives, how strong its single-coordinate associations are, and how much of its measured geometry is prompt length.
The strongest usage readout sits in an early-middle MLP region: 79.11% held-out probe accuracy at MLP layer 9 against a 6.22% shuffled-label control, with layers 10, 11 and 13 all above 77%. [data] The same stream's mean-pooled geometry collapses in six layers: participation ratio 1.008 at layer 3 and 1.104 at layer 26, against 9.92 and 21.05 at the final input token, and the leading principal component of both tracks token count at 0.898 and 0.903. [data] Length does not carry the readout: label membership explains 1.75% of token-length variance and a token-count-only classifier reaches 8.66% against the probe's 79.11%. [data] And near-identical geometry across distant layers carries different information: CKA 0.9984 between MLP layers 3 and 26 while their probes differ by 5.43 points, where adjacent readout layers 9 and 10 read only 0.6202. [data]
Scope. This census measures text-input activations for 8,965 prompts across 17 usage labels and 175 fine buckets. It does not evaluate generated text, reasoning traces, tool calls, benchmark behavior or compression behavior. Unless stated otherwise, results use the MLP intermediate stream at
mean_all_real, the mean over all real input tokens, template and special tokens included; the corpus runs 7 to 55 tokens, median 21. The usage-label probe is a five-fold, 256-PC multinomial classifier with training-fold PCA and scaling; the majority-class baseline is 6.58% and uniform chance is 5.88%. Probes are published atmean_all_realonly. Themlp,gateandupstreams are 18,944-wide intermediate activations feeding the layer's down projection, not the 3,584-wide residual-space output.
Evidence tags distinguish analytical claims: [data] is a direct measurement or calculation from the pinned atlas databases or capture metadata, [inferred] is my interpretation under stated assumptions, [data, inferred] is both, and [guess] is a mechanism I haven't tested.
Usage readout peaks in an early-middle MLP region
The MLP probe curve rises from 58.54% at layer 1 to 73.90% at layer 6, peaks at 79.11% at layer 9 and stays high through the middle, with four layers above 77%: 79.11, 78.77, 77.62 and 77.39 at layers 9, 10, 11 and 13, before ending at 66.48% at layer 27. [data] The gate stream peaks at 77.41% at layer 10. [data] The 0.33-point spread between layers 9 and 10 sits inside their fold-to-fold standard deviations of 0.86 and 1.39 points, so the defensible claim is a region, not a uniquely special layer; those standard deviations are not confidence intervals and no paired test is available from the exports. [data, inferred]
Category-mean z-scores for 64 high-F MLP coordinates at layer 9, the most readable layer in this atlas.
The readout is supervised-linear, and the unsupervised geometry is far less partitioned: at MLP layer 9 the probe reads 79.11% while 10-nearest-neighbour label agreement is 49.63%, the label silhouette is -0.0011 and k-means adjusted NMI is 0.113. [data] A linear classifier separates the usage categories; the same spaces do not break into clean label clusters, and both facts are about this corpus's wording, not about the model's capabilities. [inferred]
Significance saturates where the readout is strong, so it cannot prioritize: at MLP layer 9, 99.93% of the 18,944 coordinates pass q < 0.01 at a mean eta2 of 0.0371. [data] Rank by effect size and held-out association, not by q. Across all eight streams and 28 layers, 22,283 feature coordinates carry a strong one-vs-rest AUROC association (|AUROC - 0.5| >= 0.25); 22,281 of them also pass q < 0.01, with 19,811 single-label-selective and 2,470 mixed, and the remaining 2 sitting above the significance threshold. [data] These are layer and stream coordinates; projected streams overlap computationally, so they are not that many distinct physical units. [data]
Mean-pooled geometry collapses onto length; the readout does not
Mean pooling over short prompts produces dominated streams: six of the 28 mean-pooled MLP layers read participation ratio below 3, the atlas's geometry_dominated flag, at layers 3, 4, 5, 11, 25 and 26. [data] The same streams at the final input token are not dominated:
| MLP stream | PR, mean-pooled | PR, final input token | PC1 length correlation, mean-pooled | Probe, mean-pooled |
|---|---|---|---|---|
| Layer 3 | 1.008 | 9.92 | 0.898 | 66.74% |
| Layer 11 | 1.352 | 43.26 | 0.736 | 77.62% |
| Layer 26 | 1.104 | 21.05 | 0.903 | 72.17% |
One direction dominating the variance is the safe statement; "the working space has one dimension" is not. [inferred] Layer 11 reads PR 1.352 while its TwoNN intrinsic dimension is 31.16 and it needs 47 principal components for 90% of its variance, all in the same stream. [data]
The dominating direction tracks prompt length. The mean-pooled MLP leading PC correlates with token count at 0.899 at layer 0, 0.898 at layer 3 and 0.903 at layer 26; through layers 0 to 8 it stays at 0.82 or above except layer 5 at 0.548, it weakens through the middle stack (0.439 at layer 10, 0.367 at layer 14, 0.414 at layer 20), and it falls to 0.032 at layer 27. [data] mean_all_real averages the template's tokens into every row, so short inputs make length the dominant shared component; these summaries are not length-residualized. [data, inferred]
Length does not explain the category readout. Label membership explains 1.75% of token-count variance, and a five-fold multinomial classifier on spline-transformed token counts alone reaches 8.66%, against the atlas probe's 79.11% at layer 9. [data] The mean-pooled geometry is length-shaped while the readout carries much more than length. [data, inferred] A lexical baseline bounds the task itself: a word-unigram/bigram TF-IDF logistic classifier on the prompt texts reaches 74.51% on random stratified five-fold splits but 32.82% when entire fine buckets are held out. [data] Much of this category task is recoverable from ordinary wording, and transfer to unseen subtopics is far weaker. [data, inferred]
Distant dominated layers look alike; adjacent readout layers do not
The two most length-dominated MLP layers, 3 and 26, read CKA 0.9984 against each other while their probes differ by 5.43 points (66.74% to 72.17%). [data] The adjacent readout layers 9 and 10 read only 0.6202. [data] High CKA between distant, variance-dominated layers is compatible with shared length structure and does not establish functional redundancy; CKA is dominated by high-variance directions, and the smaller directions a classifier uses need not move with it. [data, inferred] The measurements that would split nuisance structure from shared computation: CKA after a train-fitted length regression, CKA after removing the leading principal components, and content-only against template-inclusive pooling. These are proposed tests, not results. [data, inferred]
Within a single layer, label directions overlap the way the corpus's usage categories overlap: at MLP layer 9 the creative_writing and humor directions sit at cosine 0.699, and niche and tool_use at 0.674, with ml_ai and niche next at 0.398. [data] These are same-basis cosines within one layer, so they are comparable; cross-layer direction cosines are not, for the reason in Limits. [data]
Tool use concentrates the selective surface
tool_use is 3.23% of the corpus (290 of 8,965 prompts) and holds 24.4% of the selective coordinates: 4,840 of 19,811 across all streams, and 93 of the 158 single-label-selective coordinates at the readout peak, MLP layer 9. [data] The concentration could reflect distinctive usage structure, distinctive vocabulary, or both; the census does not separate them. [inferred]
| Strongest label association | Selective coordinates | Share |
|---|---|---|
tool_use |
4,840 | 24.4% |
creative_writing |
2,669 | 13.5% |
ml_ai |
2,125 | 10.7% |
core_technical |
1,878 | 9.5% |
learning |
1,849 | 9.3% |
introspection |
1,769 | 8.9% |
humor |
1,041 | 5.3% |
writing |
943 | 4.8% |
Concrete candidates at the peak: MLP layer 9 coordinate 6761 carries tool_use at AUROC 0.856 (eta2 0.242), while coordinate 1626 carries data at AUROC 0.152 and coordinate 11085 carries creative_writing at 0.160, equally strong negative associations. [data] The strongest gate candidate sits one layer later: gate layer 10 coordinate 10678 carries humor at AUROC 0.874 with eta2 0.364. [data] These are observational candidates for targeted tests, not demonstrated components. [inferred]
The dictionary gives one of them a precise lexical handle. MLP layer 9 atom 83 carries tool_use at AUROC 0.782, active on 2.63% of prompts, and all ten of its strongest prompts contain the word "agent". [data] Across the corpus, "agent" or "agents" appears in 154 of the 290 tool_use prompts (53.1%) and 42 of the 8,675 others (0.48%). [data] That does not make the atom a word detector, and it names the test that would decide: agent-design requests phrased without the word, against unrelated requests that contain it. [data, inferred] The dictionaries are exploratory summaries, not decompositions: reconstruction R2 runs 0.207 to 0.359 across the eight streams, in the standardized top-256 PCA space rather than the raw activations, and only 4 of 1,024 atoms pass the strong-AUROC bar, all four for tool_use (gate 0.782, mlp 0.782, heads 0.757, up 0.754). [data]
Head norms lean the same way: 781 of 784 head-norm ANOVAs pass q < 0.01, with tool_use the leading norm label on 154 heads and ml_ai on 130. [data] A norm label says the head's output magnitude varies by category; it says nothing about which tokens the head attends to.
28 layers, eight streams, one dead coordinate
The model is a 28-layer Qwen2 stack, full attention at every layer, 28 query heads and 4 KV heads per layer at head dimension 128, hidden size 3,584. The capture reads eight streams at both positions for 224 component-layer pairs and 1,921,024 feature rows. [data]
| Component | Width recorded |
|---|---|
gate, up, mlp |
18,944 |
attn, heads, q |
3,584 |
k, v |
512 (4 x 128) |
Health checks report no NaNs or infinities anywhere in the capture, and no coordinate meets the near-zero dead rule (largest absolute activation below 1e-6). [data] The taxonomy flags exactly one never-moving coordinate: layer 1, k, coordinate 48, at AUROC 0.5 and zero label variance. [data] The corpus carries no exact duplicate prompts and none after lowercasing and punctuation removal; a word-overlap audit finds 3 pairs above cosine 0.90, one of them with different labels, which is label ambiguity, not duplication. [data]
Verdict: a readable early-middle map on length-shaped mean-pooled geometry
LoCo-7B's usage signal is strongly readable from an early-middle MLP region (79.11% at layer 9, four layers above 77%), concentrated on tool use (24.4% of selective coordinates against a 3.23% corpus share) while its mean-pooled geometry collapses onto prompt length in six dominated layers with leading PCs tracking token count at up to 0.903. [data] The readout is not length: the token-count control reads 8.66% against the probe's 79.11%. [data] Geometric similarity and readable information are separate measurements here: the two most dominated, most length-correlated layers read CKA 0.9984 while differing by 5.43 probe points, and the adjacent readout layers read 0.6202. [data] For anyone editing, steering or ablating: rank coordinates by effect size rather than q, apply a length control before reading a CKA above 0.99 as redundancy, and treat the tool_use coordinates and atom 83 as candidates to test, not established components. [data, inferred]
Limits
- Probes, neighbours and trajectories are published at
mean_all_realonly; the 224last_inputrows carry sanity and geometry but no probe numbers, so position-specific readout claims are unsupported here.mean_all_realaverages template tokens into every row, and the corpus runs 7 to 55 tokens, so pooling artifacts are in scope for this capture. - Cross-layer direction cosines are coordinate-dependent. Each layer's
mlp,gateandupbases are separate learned intermediate neurons; matching coordinate indices do not identify corresponding features, and a function-preserving permutation of one layer's intermediate neurons changes the cosine without changing model behaviour. Within-layer cosines are unaffected. CKA avoids the coordinate-matching problem but is dominated by high-variance structure. - The dictionaries are independently fitted summaries: reconstruction R2 0.207 to 0.359 in the standardized top-256 PCA space, 4 of 1,024 atoms above the strong-AUROC bar. They are not a complete or disentangled decomposition of any stream.
- Fold assignments, seeds, solver settings and out-of-fold predictions are not in the exports; probe values are published aggregates, and fold standard deviations are not confidence intervals. The cross-validation procedure cannot be re-executed from the aggregate tables alone.
- The corpus tests short single-turn usage categories, not reasoning mode, chain-of-thought length, tool execution or generated output, so nothing here confirms or contradicts the developer's compression claims. A lexical baseline reads 74.51% on random folds and 32.82% with whole fine buckets held out, bounding how much of the readout is ordinary wording. Coordinate associations, norm labels and dictionary atoms are observational evidence, not tested circuits.
- The length and nuisance-structure tests named above (length-regressed CKA, leading-PC removal, content-only pooling) are proposed, not run. This card maps the fine-tuned weights alone; it does not isolate what the DPO tune changed relative to its base model.
- Capture provenance: capture code
dc0edf6cda8514615c552ecc11ae424c16265a9b, analysis code92065d4bc2c15f672e4f2ad55c07c1be2307b872, capture fingerprintsha256:7b2ccbfa20918e63d5e838476b12a8c823d1de7c367f6918cd5beb8ca6edd9a6, jobloco-7b-census-261108-ab7.
Atlases
Qwen 3.5 9B · Qwen 3.5 4B · Qwen 3.5 2B · Qwen 3 8B · Qwen 3 14B · more under juiceb0xc0de
All six tables are Parquet and in atlas/atlas.sqlite; the queries below use the local SQLite table names.
Selective counts by label, across all eight streams:
SELECT top_label, COUNT(*) AS n
FROM features
WHERE taxonomy = 'selective'
GROUP BY top_label
ORDER BY n DESC;
The MLP geometry and probe curves:
SELECT layer, geometry_participation_ratio AS pr, probes_probe_accuracy AS probe,
probes_probe_control_accuracy AS control, neighbors_knn_label_agreement
FROM layers
WHERE component = 'mlp' AND position = 'mean_all_real'
ORDER BY layer;
The strongest tool_use coordinates at the readout peak, negative AUROCs included as equally strong negative leans:
SELECT neuron, top_auroc, eta2
FROM features
WHERE layer = 9 AND component = 'mlp' AND top_label = 'tool_use'
ORDER BY abs(top_auroc - 0.5) DESC
LIMIT 20;
The head-norm label counts:
SELECT norm_top_label, COUNT(*) AS heads
FROM per_head
WHERE component = 'heads'
GROUP BY norm_top_label
ORDER BY heads DESC;
Dataset revisions used for every number above:
| Atlas | revision |
|---|---|
| LoCo-7B atlas | 23163d91ee10fd499d2200beece0dcdf9b4f1321 |

