Text Generation
PEFT
GGUF
English
llama
formal-logic
reasoning
lora
llama.cpp
smollm2
twil-lm
conversational
Instructions to use webAI-Official/TwIL-LM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use webAI-Official/TwIL-LM with PEFT:
Task type is invalid.
- 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
- Ollama
How to use webAI-Official/TwIL-LM with Ollama:
ollama run hf.co/webAI-Official/TwIL-LM:Q4_K_M
- Unsloth Studio
How to use webAI-Official/TwIL-LM with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for webAI-Official/TwIL-LM to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for webAI-Official/TwIL-LM to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for webAI-Official/TwIL-LM to start chatting
- Atomic Chat new
- 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
Upload 9 files
Browse filesInitial commit of weights and tokenized adapter of v1 model. Model based on pretrained SmolLM2-1.7B.
- .gitattributes +4 -0
- merged/chat_template.jinja +6 -0
- merged/config.json +43 -0
- merged/generation_config.json +10 -0
- merged/smollm2-lorav1-ps-merged-Q4_K_M.gguf +3 -0
- merged/smollm2-lorav1-ps-merged-Q5_K_M.gguf +3 -0
- merged/smollm2-lorav1-ps-merged-Q8_0.gguf +3 -0
- merged/smollm2-lorav1-ps-merged-f16.gguf +3 -0
- merged/tokenizer.json +0 -0
- merged/tokenizer_config.json +157 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
merged/smollm2-lorav1-ps-merged-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
merged/smollm2-lorav1-ps-merged-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
merged/smollm2-lorav1-ps-merged-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
merged/smollm2-lorav1-ps-merged-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
merged/chat_template.jinja
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
|
| 2 |
+
You are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>
|
| 3 |
+
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
|
| 4 |
+
' + message['content'] + '<|im_end|>' + '
|
| 5 |
+
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 6 |
+
' }}{% endif %}
|
merged/config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"torch_dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 8192,
|
| 15 |
+
"max_position_embeddings": 8192,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 32,
|
| 19 |
+
"num_hidden_layers": 24,
|
| 20 |
+
"num_key_value_heads": 32,
|
| 21 |
+
"pad_token_id": 0,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 130000,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": true,
|
| 29 |
+
"transformers.js_config": {
|
| 30 |
+
"torch_dtype": "q4",
|
| 31 |
+
"kv_cache_dtype": {
|
| 32 |
+
"fp16": "float16",
|
| 33 |
+
"q4f16": "float16"
|
| 34 |
+
},
|
| 35 |
+
"use_external_data_format": {
|
| 36 |
+
"model.onnx": true,
|
| 37 |
+
"model_fp16.onnx": true
|
| 38 |
+
}
|
| 39 |
+
},
|
| 40 |
+
"unsloth_version": "2026.7.4",
|
| 41 |
+
"use_cache": true,
|
| 42 |
+
"vocab_size": 49152
|
| 43 |
+
}
|
merged/generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
2
|
| 6 |
+
],
|
| 7 |
+
"max_length": 8192,
|
| 8 |
+
"pad_token_id": 0,
|
| 9 |
+
"transformers_version": "5.5.0"
|
| 10 |
+
}
|
merged/smollm2-lorav1-ps-merged-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:185abb5a630ba760b0abd4f4f886d74b1c193d6c8350e9c2bab88355ba38bcf9
|
| 3 |
+
size 1055609376
|
merged/smollm2-lorav1-ps-merged-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:add126e1a9dc5d4c4c01fb273df5e111a2c54f711684b22d2f56a8f43658006d
|
| 3 |
+
size 1225478688
|
merged/smollm2-lorav1-ps-merged-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9b2797be007757c22d8fe9b87557946e4b3d40616718d5cc12a692d1ed9792cc
|
| 3 |
+
size 1820414496
|
merged/smollm2-lorav1-ps-merged-f16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eec8fc823f1d67b460b39ed402efdd43b7c1f89c1c64d1a32d0a63a4d8c8cca4
|
| 3 |
+
size 3424735776
|
merged/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
merged/tokenizer_config.json
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
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enization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>"
|
| 11 |
+
],
|
| 12 |
+
"is_local": false,
|
| 13 |
+
"model_max_length": 8192,
|
| 14 |
+
"pad_token": "<|endoftext|>",
|
| 15 |
+
"padding_side": "left",
|
| 16 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 17 |
+
"unk_token": "<|endoftext|>",
|
| 18 |
+
"vocab_size": 49152,
|
| 19 |
+
"added_tokens_decoder": {
|
| 20 |
+
"0": {
|
| 21 |
+
"content": "<|endoftext|>",
|
| 22 |
+
"single_word": false,
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"1": {
|
| 29 |
+
"content": "<|im_start|>",
|
| 30 |
+
"single_word": false,
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"2": {
|
| 37 |
+
"content": "<|im_end|>",
|
| 38 |
+
"single_word": false,
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"3": {
|
| 45 |
+
"content": "<repo_name>",
|
| 46 |
+
"single_word": false,
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"4": {
|
| 53 |
+
"content": "<reponame>",
|
| 54 |
+
"single_word": false,
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
"5": {
|
| 61 |
+
"content": "<file_sep>",
|
| 62 |
+
"single_word": false,
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"special": true
|
| 67 |
+
},
|
| 68 |
+
"6": {
|
| 69 |
+
"content": "<filename>",
|
| 70 |
+
"single_word": false,
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"rstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"special": true
|
| 75 |
+
},
|
| 76 |
+
"7": {
|
| 77 |
+
"content": "<gh_stars>",
|
| 78 |
+
"single_word": false,
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"rstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"special": true
|
| 83 |
+
},
|
| 84 |
+
"8": {
|
| 85 |
+
"content": "<issue_start>",
|
| 86 |
+
"single_word": false,
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"rstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"special": true
|
| 91 |
+
},
|
| 92 |
+
"9": {
|
| 93 |
+
"content": "<issue_comment>",
|
| 94 |
+
"single_word": false,
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"rstrip": false,
|
| 97 |
+
"normalized": false,
|
| 98 |
+
"special": true
|
| 99 |
+
},
|
| 100 |
+
"10": {
|
| 101 |
+
"content": "<issue_closed>",
|
| 102 |
+
"single_word": false,
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"rstrip": false,
|
| 105 |
+
"normalized": false,
|
| 106 |
+
"special": true
|
| 107 |
+
},
|
| 108 |
+
"11": {
|
| 109 |
+
"content": "<jupyter_start>",
|
| 110 |
+
"single_word": false,
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"rstrip": false,
|
| 113 |
+
"normalized": false,
|
| 114 |
+
"special": true
|
| 115 |
+
},
|
| 116 |
+
"12": {
|
| 117 |
+
"content": "<jupyter_text>",
|
| 118 |
+
"single_word": false,
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"rstrip": false,
|
| 121 |
+
"normalized": false,
|
| 122 |
+
"special": true
|
| 123 |
+
},
|
| 124 |
+
"13": {
|
| 125 |
+
"content": "<jupyter_code>",
|
| 126 |
+
"single_word": false,
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"rstrip": false,
|
| 129 |
+
"normalized": false,
|
| 130 |
+
"special": true
|
| 131 |
+
},
|
| 132 |
+
"14": {
|
| 133 |
+
"content": "<jupyter_output>",
|
| 134 |
+
"single_word": false,
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"rstrip": false,
|
| 137 |
+
"normalized": false,
|
| 138 |
+
"special": true
|
| 139 |
+
},
|
| 140 |
+
"15": {
|
| 141 |
+
"content": "<jupyter_script>",
|
| 142 |
+
"single_word": false,
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"rstrip": false,
|
| 145 |
+
"normalized": false,
|
| 146 |
+
"special": true
|
| 147 |
+
},
|
| 148 |
+
"16": {
|
| 149 |
+
"content": "<empty_output>",
|
| 150 |
+
"single_word": false,
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"rstrip": false,
|
| 153 |
+
"normalized": false,
|
| 154 |
+
"special": true
|
| 155 |
+
}
|
| 156 |
+
}
|
| 157 |
+
}
|