Text Generation
Transformers
GGUF
English
phi
knowledge-system
reasoning
expert-verification
multi-domain
zero-hallucination
spatial-memory
knowledge-tiles
phi-4
microsoft
knowledge-tiles-iath
conversational
Eval Results (legacy)
Instructions to use kofdai/nullai-knowledge-system with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kofdai/nullai-knowledge-system with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kofdai/nullai-knowledge-system") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kofdai/nullai-knowledge-system") model = AutoModelForCausalLM.from_pretrained("kofdai/nullai-knowledge-system", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use kofdai/nullai-knowledge-system with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf kofdai/nullai-knowledge-system:Q4_K_M # Run inference directly in the terminal: llama cli -hf kofdai/nullai-knowledge-system:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kofdai/nullai-knowledge-system:Q4_K_M # Run inference directly in the terminal: llama cli -hf kofdai/nullai-knowledge-system:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kofdai/nullai-knowledge-system:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf kofdai/nullai-knowledge-system:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kofdai/nullai-knowledge-system:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf kofdai/nullai-knowledge-system:Q4_K_M
Use Docker
docker model run hf.co/kofdai/nullai-knowledge-system:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use kofdai/nullai-knowledge-system with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kofdai/nullai-knowledge-system" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kofdai/nullai-knowledge-system", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kofdai/nullai-knowledge-system:Q4_K_M
- SGLang
How to use kofdai/nullai-knowledge-system 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 "kofdai/nullai-knowledge-system" \ --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": "kofdai/nullai-knowledge-system", "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 "kofdai/nullai-knowledge-system" \ --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": "kofdai/nullai-knowledge-system", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kofdai/nullai-knowledge-system with Ollama:
ollama run hf.co/kofdai/nullai-knowledge-system:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use kofdai/nullai-knowledge-system with Docker Model Runner:
docker model run hf.co/kofdai/nullai-knowledge-system:Q4_K_M
- Lemonade
How to use kofdai/nullai-knowledge-system with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kofdai/nullai-knowledge-system:Q4_K_M
Run and chat with the model
lemonade run user.nullai-knowledge-system-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload cardiology_ontology.json with huggingface_hub
Browse files- cardiology_ontology.json +86 -0
cardiology_ontology.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "心臓病学オントロジー",
|
| 3 |
+
"domain": "medical",
|
| 4 |
+
"version": "0.1.0",
|
| 5 |
+
"concepts": [
|
| 6 |
+
{
|
| 7 |
+
"id": "cardio_001",
|
| 8 |
+
"name": "心臓学",
|
| 9 |
+
"children": ["cardio_002", "cardio_003"]
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"id": "cardio_002",
|
| 13 |
+
"name": "心臓の構造",
|
| 14 |
+
"parent": "cardio_001",
|
| 15 |
+
"children": ["cardio_struct_001", "cardio_struct_002", "cardio_struct_003"]
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"id": "cardio_struct_001",
|
| 19 |
+
"name": "左心室",
|
| 20 |
+
"parent": "cardio_002"
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"id": "cardio_struct_002",
|
| 24 |
+
"name": "右心室",
|
| 25 |
+
"parent": "cardio_002"
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"id": "cardio_struct_003",
|
| 29 |
+
"name": "冠動脈",
|
| 30 |
+
"parent": "cardio_002"
|
| 31 |
+
},
|
| 32 |
+
{
|
| 33 |
+
"id": "cardio_003",
|
| 34 |
+
"name": "心臓疾患",
|
| 35 |
+
"parent": "cardio_001",
|
| 36 |
+
"children": ["cardio_dis_001", "cardio_dis_002"]
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "cardio_dis_001",
|
| 40 |
+
"name": "心筋梗塞",
|
| 41 |
+
"parent": "cardio_003",
|
| 42 |
+
"children": ["cardio_ami_001", "cardio_ami_002", "cardio_ami_003", "cardio_ami_004", "cardio_ami_005", "cardio_ami_006"],
|
| 43 |
+
"standard_coordinate": {
|
| 44 |
+
"medical_space": [28, 45, 15]
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"id": "cardio_ami_001",
|
| 49 |
+
"name": "ST上昇型心筋梗塞",
|
| 50 |
+
"parent": "cardio_dis_001"
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"id": "cardio_ami_002",
|
| 54 |
+
"name": "非ST上昇型心筋梗塞",
|
| 55 |
+
"parent": "cardio_dis_001"
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"id": "cardio_ami_003",
|
| 59 |
+
"name": "症状",
|
| 60 |
+
"parent": "cardio_dis_001"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"id": "cardio_ami_004",
|
| 64 |
+
"name": "診断基準",
|
| 65 |
+
"parent": "cardio_dis_001",
|
| 66 |
+
"standard_coordinate": {
|
| 67 |
+
"medical_space": [28, 35, 15]
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"id": "cardio_ami_005",
|
| 72 |
+
"name": "治療",
|
| 73 |
+
"parent": "cardio_dis_001"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"id": "cardio_ami_006",
|
| 77 |
+
"name": "予後",
|
| 78 |
+
"parent": "cardio_dis_001"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"id": "cardio_dis_002",
|
| 82 |
+
"name": "心不全",
|
| 83 |
+
"parent": "cardio_003"
|
| 84 |
+
}
|
| 85 |
+
]
|
| 86 |
+
}
|