PEFT
Safetensors
GGUF
English
Hindi
education
gpt
tinystories
llm-training
hindi
qwen3
continued-pretraining
qlora
lora
reward-model
conversational
Instructions to use aimlcompanion/llm-training-lab with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use aimlcompanion/llm-training-lab with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use aimlcompanion/llm-training-lab 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 aimlcompanion/llm-training-lab:Q4_K_M # Run inference directly in the terminal: llama cli -hf aimlcompanion/llm-training-lab:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aimlcompanion/llm-training-lab:Q4_K_M # Run inference directly in the terminal: llama cli -hf aimlcompanion/llm-training-lab: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 aimlcompanion/llm-training-lab:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf aimlcompanion/llm-training-lab:Q4_K_M
Use Docker
docker model run hf.co/aimlcompanion/llm-training-lab:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use aimlcompanion/llm-training-lab with Ollama:
ollama run hf.co/aimlcompanion/llm-training-lab:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use aimlcompanion/llm-training-lab with Docker Model Runner:
docker model run hf.co/aimlcompanion/llm-training-lab:Q4_K_M
- Lemonade
How to use aimlcompanion/llm-training-lab with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aimlcompanion/llm-training-lab:Q4_K_M
Run and chat with the model
lemonade run user.llm-training-lab-Q4_K_M
List all available models
lemonade list
- Atomic Chat
lltRewardModels: seed-0 reward model and best-of-n pool
Browse files- lltRewardModels/bon_pool.json +0 -0
- lltRewardModels/rm-s0/README.md +15 -0
- lltRewardModels/rm-s0/chat_template.jinja +6 -0
- lltRewardModels/rm-s0/config.json +40 -0
- lltRewardModels/rm-s0/model.safetensors +3 -0
- lltRewardModels/rm-s0/tokenizer.json +0 -0
- lltRewardModels/rm-s0/tokenizer_config.json +34 -0
lltRewardModels/bon_pool.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lltRewardModels/rm-s0/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# lltRewardModels/rm-s0
|
| 2 |
+
|
| 3 |
+
A Bradley-Terry reward model from module 17 (lltRewardModels) of the LLM Training Lab: HuggingFaceTB/SmolLM2-360M
|
| 4 |
+
(Apache-2.0) with a scalar head (`LlamaForSequenceClassification`, `num_labels=1`), every weight fully fine-tuned for
|
| 5 |
+
one epoch on 3,000 pairs of HuggingFaceH4/ultrafeedback_binarized `train_prefs` (MIT; GPT-4 ratings), shuffle seed 0,
|
| 6 |
+
chats of at most 1,024 tokens, AdamW lr 1e-5, 3% warmup then cosine, batch 8 pairs, fp16 autocast, seed 0, one Kaggle T4.
|
| 7 |
+
Saved in fp16.
|
| 8 |
+
|
| 9 |
+
Input format: the SmolLM2-360M-Instruct chat template (saved here) applied to
|
| 10 |
+
`[{"role": "user", "content": prompt}, {"role": "assistant", "content": reply}]`, right padding with `<|endoftext|>`.
|
| 11 |
+
The reward is the logit at the last non-pad token.
|
| 12 |
+
|
| 13 |
+
Measured (run lltRewardModels-T2-rm-s0): held-out pairwise accuracy 0.628 (95% bootstrap CI 0.598 to 0.658) on the
|
| 14 |
+
first 1,000 `test_prefs` pairs that fit 1,024 tokens; 0.723 when the chosen reply is longer, 0.496 when it is shorter.
|
| 15 |
+
It is a small, length-biased teaching model, not a production reward model.
|
lltRewardModels/rm-s0/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 %}
|
lltRewardModels/rm-s0/config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForSequenceClassification"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "float16",
|
| 9 |
+
"eos_token_id": 0,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 960,
|
| 13 |
+
"id2label": {
|
| 14 |
+
"0": "LABEL_0"
|
| 15 |
+
},
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 2560,
|
| 18 |
+
"is_llama_config": true,
|
| 19 |
+
"label2id": {
|
| 20 |
+
"LABEL_0": 0
|
| 21 |
+
},
|
| 22 |
+
"max_position_embeddings": 8192,
|
| 23 |
+
"mlp_bias": false,
|
| 24 |
+
"model_type": "llama",
|
| 25 |
+
"num_attention_heads": 15,
|
| 26 |
+
"num_hidden_layers": 32,
|
| 27 |
+
"num_key_value_heads": 5,
|
| 28 |
+
"pad_token_id": 0,
|
| 29 |
+
"pretraining_tp": 1,
|
| 30 |
+
"rms_norm_eps": 1e-05,
|
| 31 |
+
"rope_interleaved": false,
|
| 32 |
+
"rope_parameters": {
|
| 33 |
+
"rope_theta": 100000,
|
| 34 |
+
"rope_type": "default"
|
| 35 |
+
},
|
| 36 |
+
"tie_word_embeddings": true,
|
| 37 |
+
"transformers_version": "5.22.1",
|
| 38 |
+
"use_cache": true,
|
| 39 |
+
"vocab_size": 49152
|
| 40 |
+
}
|
lltRewardModels/rm-s0/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c5ba0e6c274ce614009d8c10d2fec9d976fbd6682959dc9d81bc06fd59efc835
|
| 3 |
+
size 723676624
|
lltRewardModels/rm-s0/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lltRewardModels/rm-s0/tokenizer_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|endoftext|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|endoftext|>",
|
| 10 |
+
"<|im_start|>",
|
| 11 |
+
"<|im_end|>",
|
| 12 |
+
"<repo_name>",
|
| 13 |
+
"<reponame>",
|
| 14 |
+
"<file_sep>",
|
| 15 |
+
"<filename>",
|
| 16 |
+
"<gh_stars>",
|
| 17 |
+
"<issue_start>",
|
| 18 |
+
"<issue_comment>",
|
| 19 |
+
"<issue_closed>",
|
| 20 |
+
"<jupyter_start>",
|
| 21 |
+
"<jupyter_text>",
|
| 22 |
+
"<jupyter_code>",
|
| 23 |
+
"<jupyter_output>",
|
| 24 |
+
"<jupyter_script>",
|
| 25 |
+
"<empty_output>"
|
| 26 |
+
],
|
| 27 |
+
"is_local": false,
|
| 28 |
+
"local_files_only": false,
|
| 29 |
+
"model_max_length": 8192,
|
| 30 |
+
"pad_token": "<|endoftext|>",
|
| 31 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 32 |
+
"unk_token": "<|endoftext|>",
|
| 33 |
+
"vocab_size": 49152
|
| 34 |
+
}
|