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
Run this model with HF Jobs
Run webAI-Official/TwIL-LM on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/webAI-Official/TwIL-LM. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/webAI-Official/TwIL-LM on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/webAI-Official/TwIL-LM. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/webAI-Official/TwIL-LM. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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)# pip install -U transformers accelerate # 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=256) 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
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -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
- Llama new
- 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
Upload 9 files
Browse filesInitial commit of weights and tokenized adapter of v1 model. Model based on pretrained SmolLM2-1.7B.
Files changed (10)
- .gitattributes+4
- merged/chat_template.jinjaAdded+6
- merged/config.jsonAdded+43
- merged/generation_config.jsonAdded+10
- merged/smollm2-lorav1-ps-merged-Q4_K_M.ggufAdded+3
- merged/smollm2-lorav1-ps-merged-Q5_K_M.ggufAdded+3
- merged/smollm2-lorav1-ps-merged-Q8_0.ggufAdded+3
- merged/smollm2-lorav1-ps-merged-f16.ggufAdded+3
- merged/tokenizer.jsonAdded
- merged/tokenizer_config.jsonAdded+157
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383932 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textmerged/smollm2-lorav1-ps-merged-f16.gguf filter=lfs diff=lfs merge=lfs -textmerged/smollm2-lorav1-ps-merged-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -textmerged/smollm2-lorav1-ps-merged-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -textmerged/smollm2-lorav1-ps-merged-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
123456{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>systemYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>' }}{% endif %}{{'<|im_start|>' + message['role'] + '' + message['content'] + '<|im_end|>' + ''}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant' }}{% endif %}12345678910111213141516171819202122232425262728293031323334353637383940414243{ "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 1, "torch_dtype": "bfloat16", "eos_token_id": 2, "head_dim": 64, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 8192, "max_position_embeddings": 8192, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 24, "num_key_value_heads": 32, "pad_token_id": 0, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_parameters": { "rope_theta": 130000, "rope_type": "default" }, "tie_word_embeddings": true, "transformers.js_config": { "torch_dtype": "q4", "kv_cache_dtype": { "fp16": "float16", "q4f16": "float16" }, "use_external_data_format": { "model.onnx": true, "model_fp16.onnx": true } }, "unsloth_version": "2026.7.4", "use_cache": true, "vocab_size": 49152}12345678910{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": [ 2 ], "max_length": 8192, "pad_token_id": 0, "transformers_version": "5.5.0"}123version https://git-lfs.github.com/spec/v1oid sha256:185abb5a630ba760b0abd4f4f886d74b1c193d6c8350e9c2bab88355ba38bcf9size 1055609376123version https://git-lfs.github.com/spec/v1oid sha256:add126e1a9dc5d4c4c01fb273df5e111a2c54f711684b22d2f56a8f43658006dsize 1225478688123version https://git-lfs.github.com/spec/v1oid sha256:9b2797be007757c22d8fe9b87557946e4b3d40616718d5cc12a692d1ed9792ccsize 1820414496123version https://git-lfs.github.com/spec/v1oid sha256:eec8fc823f1d67b460b39ed402efdd43b7c1f89c1c64d1a32d0a63a4d8c8cca4size 3424735776123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157{ "add_prefix_space": false, "backend": "tokenizers", "bos_token": "<|im_start|>", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "extra_special_tokens": [ "<|im_start|>", "<|im_end|>" ], "is_local": false, "model_max_length": 8192, "pad_token": "<|endoftext|>", "padding_side": "left", "tokenizer_class": "GPT2Tokenizer", "unk_token": "<|endoftext|>", "vocab_size": 49152, "added_tokens_decoder": { "0": { "content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "1": { "content": "<|im_start|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "2": { "content": "<|im_end|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "3": { "content": "<repo_name>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "4": { "content": "<reponame>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "5": { "content": "<file_sep>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "6": { "content": "<filename>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "7": { "content": "<gh_stars>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "8": { "content": "<issue_start>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "9": { "content": "<issue_comment>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "10": { "content": "<issue_closed>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "11": { "content": "<jupyter_start>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "12": { "content": "<jupyter_text>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "13": { "content": "<jupyter_code>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "14": { "content": "<jupyter_output>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "15": { "content": "<jupyter_script>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true }, "16": { "content": "<empty_output>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": false, "special": true } }}.gitattributes+4
merged/chat_template.jinjaAdded+6
merged/config.jsonAdded+43
merged/generation_config.jsonAdded+10
merged/smollm2-lorav1-ps-merged-Q4_K_M.ggufAdded+3
merged/smollm2-lorav1-ps-merged-Q5_K_M.ggufAdded+3
merged/smollm2-lorav1-ps-merged-Q8_0.ggufAdded+3
merged/smollm2-lorav1-ps-merged-f16.ggufAdded+3
merged/tokenizer.jsonAdded
merged/tokenizer_config.jsonAdded+157