Instructions to use neurostuff/paragraph-peak-picker-nuextract3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use neurostuff/paragraph-peak-picker-nuextract3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="neurostuff/paragraph-peak-picker-nuextract3") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("neurostuff/paragraph-peak-picker-nuextract3") model = AutoModelForMultimodalLM.from_pretrained("neurostuff/paragraph-peak-picker-nuextract3", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use neurostuff/paragraph-peak-picker-nuextract3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "neurostuff/paragraph-peak-picker-nuextract3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "neurostuff/paragraph-peak-picker-nuextract3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/neurostuff/paragraph-peak-picker-nuextract3
- SGLang
How to use neurostuff/paragraph-peak-picker-nuextract3 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 "neurostuff/paragraph-peak-picker-nuextract3" \ --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": "neurostuff/paragraph-peak-picker-nuextract3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "neurostuff/paragraph-peak-picker-nuextract3" \ --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": "neurostuff/paragraph-peak-picker-nuextract3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use neurostuff/paragraph-peak-picker-nuextract3 with Docker Model Runner:
docker model run hf.co/neurostuff/paragraph-peak-picker-nuextract3
paragraph-peak-picker (NuExtract3)
Picks the peaks out of a neuroimaging paper's prose ("activation in the left amygdala (x = -22, y = -4,
z = -18), Z = 4.1"). It reads them into structured analyses: which coordinates belong to which contrast, with
their statistic, cluster size and space. A fine-tune of numind/NuExtract3
(revision c99dc8f5641b866aa0192b6ea78f84bf9f3535f1). Its sibling for results tables is
neurostuff/table-peak-plucker-nuextract3.
Formerly jdkent/nuextract3-neuro-prose; that id redirects here.
Versions are tags on this repo. main is the newest. Pin one:
AutoModelForCausalLM.from_pretrained("neurostuff/paragraph-peak-picker-nuextract3", revision="v3")
These are merged weights: the LoRA run also trains Mamba-layer tensors LoRA has no handle on, so an adapter-only load would be silently wrong.
How ns-pond runs it
- Stages:
passages(finds the passages that print coordinates),prose(this model reads each one) andresolve(merges them with the tables' sets) in ns-pond. - Name: served by vLLM under a name that carries the version (
nu-prose-v3for v3), named in a run config asprose_model. - Prompt: ns-pond sends v3's
instruction_v3.txtunderPROSE_PROMPT_VERSION2026-11-22.nu-prose-v3(ingestion_workflow/clients/prose_coordinates.py).
Prompting
Send NuExtract3's native template mode: instruction_v3.txt, then the document, with
template.json as the chat template's template. The document is
Title: <title>
Abstract: <abstract>
Section: <heading>
Context before: <text just before the passage>
Passage: <the passage with the coordinates>
Context after: <text just after>
When there is context, append to the instruction: " The passage may be preceded and followed by
context from the same article; list only the coordinates in the Passage, and use the context to name
their analyses." Missing parts are left out. Decode greedily, ideally constrained by template.json as
a JSON schema (vLLM structured_outputs). This is how ns-pond
calls it (ingestion_workflow/clients/prose_coordinates.py).
v3
v3 follows the same rules as nuextract3-neuro-tables v23:
- Every brain coordinate is a point, whatever it's for: seeds, ROI centres, stimulation targets, other studies' peaks. Coordinates of non-brain things (voxel sizes, docking grids) stay out.
- A seed's own centre is its own analysis, named
Seed: <seed name>. - An analysis the passage names as finding nothing ("the reverse contrast showed no significant clusters") is kept with no points.
- A coordinate reported for several results (an F test and its post hoc tests) is listed under each.
- Statistics only when reported for that peak; cluster sizes only in voxels or mm³.
Training data: 15,259 passages (sha256 c6b680f0…), 44% real. The real passages are model drafts
audited against those rules by Claude Sonnet, each output checked so every coordinate, value and
cluster size it gives is printed in the passage. They include 3,500 passages mined for the hard
cases: null results, post hoc tests, seeds, conjunctions, signed correlations, covariates, units.
The data isn't published, because the passages are from papers.
LoRA (ranks 16 for the linear-attention mixers, 32 for attention, 12 for the MLPs) plus the directly trained tensors, lr 1e-4, global batch 33, on 3 A100s. Planned for 2 epochs (924 steps). These weights are step 700, chosen as the best of steps 300–924 on the test sets below. Steps 850 to 924 score identically.
Held out, greedy, constrained by the schema, each model under its own instruction. Points match on rounded xyz; an analysis matches when half its points or more are shared:
| gold (78 passages): points found / analyses matched | NMB (111): points / analyses | named null results kept (of 39) | Seed: analyses (of 15) |
hard synthetic (200): points / analyses | |
|---|---|---|---|---|---|
| v2 (nu-prose-norole) | 98.7% / 88.8% | 98.2% / 89.9% | 0 | 0 | 96.1% / 94.2% |
| v3 | 100% / 91.4% | 97.7% / 92.3% | 32 | 14 | 100% / 100% |
Precision is 97–100% for both. The gold and NMB answer keys were re-audited under the v3 rules
(Claude Opus), so v2 can't score on null results or Seed: names there. On the hard synthetic set,
v2 gets 69% of F-test/post hoc points against v3's 100%.
Known limits
- The answer keys are model audits, checked for every value being printed in the passage, not hand labels.
- v3 sometimes adds a null analysis the answer key lacks. The ones we read were real ("neither age, nor BDI, were significantly associated").
- One
Seed:analysis of 15 on gold is missed.
License
apache-2.0, as its base model. The training data is not published, because the passages are from papers.
- Downloads last month
- 42