Text Generation
Transformers
Safetensors
GGUF
English
llama
formal-logic
reasoning
lora
model-merging
wise-ft
reinforcement-learning
grpo
smollm2
twil-lm
conversational
text-generation-inference
Instructions to use webAI-Official/TwIL-LM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use webAI-Official/TwIL-LM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="webAI-Official/TwIL-LM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("webAI-Official/TwIL-LM") model = AutoModelForCausalLM.from_pretrained("webAI-Official/TwIL-LM", 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 webAI-Official/TwIL-LM 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 webAI-Official/TwIL-LM:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf webAI-Official/TwIL-LM:Q4_K_M # Run inference directly in the terminal: llama cli -hf webAI-Official/TwIL-LM: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 webAI-Official/TwIL-LM:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf webAI-Official/TwIL-LM: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 webAI-Official/TwIL-LM:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf webAI-Official/TwIL-LM:Q4_K_M
Use Docker
docker model run hf.co/webAI-Official/TwIL-LM:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use webAI-Official/TwIL-LM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "webAI-Official/TwIL-LM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "webAI-Official/TwIL-LM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/webAI-Official/TwIL-LM:Q4_K_M
- SGLang
How to use webAI-Official/TwIL-LM 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 "webAI-Official/TwIL-LM" \ --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": "webAI-Official/TwIL-LM", "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 "webAI-Official/TwIL-LM" \ --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": "webAI-Official/TwIL-LM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use webAI-Official/TwIL-LM with Ollama:
ollama run hf.co/webAI-Official/TwIL-LM:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use webAI-Official/TwIL-LM with Docker Model Runner:
docker model run hf.co/webAI-Official/TwIL-LM:Q4_K_M
- Lemonade
How to use webAI-Official/TwIL-LM with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull webAI-Official/TwIL-LM:Q4_K_M
Run and chat with the model
lemonade run user.TwIL-LM-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Removed the plot assets
#1
by anurag051194 - opened
README.md
CHANGED
|
@@ -116,7 +116,7 @@ hardware, wall-clock time, and energy consumption are not documented in the
|
|
| 116 |
current release artifacts. These should be added when verified records become
|
| 117 |
available.
|
| 118 |
|
| 119 |
-
|
| 120 |
|
| 121 |
## Evaluation
|
| 122 |
|
|
@@ -128,16 +128,11 @@ over the eligible objectives. `mcq_answer` and `procedural` use
|
|
| 128 |
`max(accuracy, loose_match)`. `lean_prove` and perplexity corpora are excluded
|
| 129 |
from the macro score.
|
| 130 |
|
| 131 |
-

|
| 132 |
-
|
| 133 |
-

|
| 134 |
|
| 135 |
The broader comparison includes checkpoints with different parameter counts,
|
| 136 |
training procedures, and adaptation methods. It is useful for context but is not
|
| 137 |
a controlled architecture or scaling study.
|
| 138 |
|
| 139 |
-

|
| 140 |
-
|
| 141 |
TwiL-LM performs best on entailment labeling (**0.655**) and improves FOL
|
| 142 |
translation (**0.235**, compared with approximately zero for the base). Lean
|
| 143 |
formalization, Lean proving, and procedural reasoning remain weak.
|
|
@@ -147,22 +142,13 @@ formalization, Lean proving, and procedural reasoning remain weak.
|
|
| 147 |
OOD transfer was measured on GSM8K, ARC-Challenge chain-of-thought,
|
| 148 |
ARC-Challenge 25-shot log-likelihood (`acc_norm`), and LogicBench BQA.
|
| 149 |
|
| 150 |
-

|
| 151 |
-
|
| 152 |
Compared with SmolLM2-1.7B, TwiL-LM improves LogicBench BQA
|
| 153 |
(**0.590 vs 0.563**) but is lower on GSM8K (**0.380 vs 0.413**), ARC-C
|
| 154 |
chain-of-thought (**0.463 vs 0.587**), and ARC-C 25-shot log-likelihood
|
| 155 |
(**0.460 vs 0.490**).
|
| 156 |
|
| 157 |
-

|
| 158 |
-
|
| 159 |
-
These results indicate mixed transfer outside the formal-logic training
|
| 160 |
-
distribution. Larger general reasoning models remain stronger on several OOD
|
| 161 |
-
benchmarks.
|
| 162 |
-
|
| 163 |
### Throughput evaluation
|
| 164 |
|
| 165 |
-

|
| 166 |
|
| 167 |
The formal-logic run generated 422,627 tokens in 1,152.34 generation seconds,
|
| 168 |
or **366.8 aggregate tokens per second**. The configuration used a maximum of
|
|
|
|
| 116 |
current release artifacts. These should be added when verified records become
|
| 117 |
available.
|
| 118 |
|
| 119 |
+
|
| 120 |
|
| 121 |
## Evaluation
|
| 122 |
|
|
|
|
| 128 |
`max(accuracy, loose_match)`. `lean_prove` and perplexity corpora are excluded
|
| 129 |
from the macro score.
|
| 130 |
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
The broader comparison includes checkpoints with different parameter counts,
|
| 133 |
training procedures, and adaptation methods. It is useful for context but is not
|
| 134 |
a controlled architecture or scaling study.
|
| 135 |
|
|
|
|
|
|
|
| 136 |
TwiL-LM performs best on entailment labeling (**0.655**) and improves FOL
|
| 137 |
translation (**0.235**, compared with approximately zero for the base). Lean
|
| 138 |
formalization, Lean proving, and procedural reasoning remain weak.
|
|
|
|
| 142 |
OOD transfer was measured on GSM8K, ARC-Challenge chain-of-thought,
|
| 143 |
ARC-Challenge 25-shot log-likelihood (`acc_norm`), and LogicBench BQA.
|
| 144 |
|
|
|
|
|
|
|
| 145 |
Compared with SmolLM2-1.7B, TwiL-LM improves LogicBench BQA
|
| 146 |
(**0.590 vs 0.563**) but is lower on GSM8K (**0.380 vs 0.413**), ARC-C
|
| 147 |
chain-of-thought (**0.463 vs 0.587**), and ARC-C 25-shot log-likelihood
|
| 148 |
(**0.460 vs 0.490**).
|
| 149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
### Throughput evaluation
|
| 151 |
|
|
|
|
| 152 |
|
| 153 |
The formal-logic run generated 422,627 tokens in 1,152.34 generation seconds,
|
| 154 |
or **366.8 aggregate tokens per second**. The configuration used a maximum of
|