5 Downloads Updated 1 month ago
ollama run nyashastino/lfx
Extract the logical skeleton of natural-language arguments into structured JSON.
nyashastino/lfx is a fine-tuned 3B parameter model (based on Qwen2.5-3B-Instruct) engineered specifically to deconstruct natural-language arguments. Given an argumentative passage, it extracts individual premises, isolates the asserted conclusion, determines whether the argument is deductive or inductive, identifies the specific logical form or fallacy (from a 22-class taxonomy), and reconstructs unstated enthymematic premises.
Run directly in your terminal:
ollama run nyashastino/lfx "All men are mortal. Socrates is a man. Therefore Socrates is mortal."
Output:
{
"premises": [
"All men are mortal.",
"Socrates is a man."
],
"conclusion": "Socrates is mortal.",
"argument_type": "deductive",
"form": [
"categorical syllogism"
],
"suppressed_premise": null
}
| Tag | Quantization | Size | RAM Required | Best For |
|---|---|---|---|---|
nyashastino/lfx:latestnyashastino/lfx:3b-q8 |
Q8_0 (8-bit) |
3.3 GB | ~4.5 GB | Primary Release. Best overall accuracy (89.7% benchmark accuracy, 78.1% on held-out human prose) and highest premise extraction fidelity. |
To pull the model:
ollama pull nyashastino/lfx
The model responds strictly with a single, valid JSON object matching this schema:
{
"premises": [
"First premise statement",
"Second premise statement"
],
"conclusion": "The claim being argued for",
"argument_type": "deductive" | "inductive",
"form": [
"primary logical form or fallacy"
],
"suppressed_premise": "Unstated assumption required for validity, or null"
}
premises (array of strings): Explicit claims provided as evidence or support.conclusion (string): Central asserted claim the premises aim to establish.argument_type (string): "deductive" (presented as following with necessity) or "inductive" (presented as probable/supported).form (array of 1–3 strings): Primary logical form or fallacy exhibited. Single-step arguments have 1 form; multi-step chains order moves with the primary move first.suppressed_premise (string or null): Reconstructed unstated premise (enthymeme) necessary to bridge premises to conclusion. null if the argument is complete as stated.Aligned with formal logic and critical thinking curricula (Duke University Think Again framework):
modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism, categorical syllogism, reductio ad absurdumgeneralization, application of generalization, inference to the best explanation, analogy, causal, authorityaffirming the consequent, denying the antecedentad hominem, hasty generalization, false dilemma, ad populum, begging the question, straw man, equivocationother (reserved for multi-step arguments or patterns outside this taxonomy)Evaluated on the unified LFX-Bench v1 (1,521 unseen argumentative passages across all 22 classes with verified provenance):
| Benchmark Metric | Full Benchmark (n=1521) | Held-Out Human Prose (n=485) |
|---|---|---|
| End-to-End Form Accuracy | 89.7% (1365 / 1521) | 78.1% (379 / 485) |
| Macro-F1 (22 Classes) | 0.861 | 0.840 |
| Schema Validity | 99.8% | 99.8% |
| JSON Parses | 99.9% | 100% |
| Argument Type Accuracy | 94.4% | 84.5% |
| Premise F1 | 0.890 | 0.748 |
| Conclusion Similarity | 0.911 | 0.925 |
| Suppressed Premise Match | 0.900 | 0.812 |
constructed-symbolic (n=693): 98.8% (label specified by construction, verified by blind formalization through symbolic rules)constructed-consensus (n=309): 92.9% (inductive forms verified by blind multi-model agreement)external-human (n=485): 78.1% (authentic human op-eds and speech passages from LOGIC)project-authored (n=34): 41.2% (condensed classical philosophical texts; 12 of 34 are multi-step other)hypothetical syllogism: 1.000 F1 (100% recall, 100% precision)affirming the consequent: 0.989 F1 (98.9% recall, 98.9% precision)reductio ad absurdum: 0.975 F1 (98.8% recall, 96.3% precision)categorical syllogism: 0.922 F1 (98.9% recall, 86.4% precision)ad hominem: 0.843 F1 (75.0% recall, 96.2% precision)ad populum: 0.831 F1 (82.7% recall, 83.5% precision)false dilemma: 0.800 F1 (83.0% recall, 77.2% precision)begging the question: 0.788 F1 (71.1% recall, 88.5% precision)straw man: 0.681 F1 (85.2% recall, 56.8% precision)equivocation: 0.643 F1 (64.3% recall, 64.3% precision)ollama-python)import json
import ollama
client = ollama.Client()
prompt = (
"Either humanity dramatically reduces carbon emissions within a decade, "
"or we face ecological collapse. We will not cut emissions, therefore "
"ecological collapse is inevitable."
)
res = client.chat(
model="nyashastino/lfx",
messages=[{"role": "user", "content": prompt}],
options={"temperature": 0.0},
)
result = json.loads(res["message"]["content"])
print(json.dumps(result, indent=2))
curl)curl http://localhost:11434/api/chat -d '{
"model": "nyashastino/lfx",
"messages": [
{"role": "user", "content": "Nobody has proven that ghosts don'\''t exist, so they must be real."}
],
"stream": false
}'
import ollama from 'ollama';
const response = await ollama.chat({
model: 'nyashastino/lfx',
messages: [{
role: 'user',
content: 'Smartphones cause attention deficits because constantly switching apps fragments concentration.'
}],
});
const analysis = JSON.parse(response.message.content);
console.log(analysis);
other.Qwen2.5-3B-Instruct under the Qwen Research License Agreement (Alibaba Cloud). Non-commercial research use only.