Text Generation
Transformers
Safetensors
English
llama
particle
conversational
text-generation-inference
Instructions to use prathamkode/particle-1.6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prathamkode/particle-1.6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prathamkode/particle-1.6") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prathamkode/particle-1.6") model = AutoModelForCausalLM.from_pretrained("prathamkode/particle-1.6", 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
- vLLM
How to use prathamkode/particle-1.6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prathamkode/particle-1.6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prathamkode/particle-1.6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prathamkode/particle-1.6
- SGLang
How to use prathamkode/particle-1.6 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 "prathamkode/particle-1.6" \ --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": "prathamkode/particle-1.6", "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 "prathamkode/particle-1.6" \ --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": "prathamkode/particle-1.6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prathamkode/particle-1.6 with Docker Model Runner:
docker model run hf.co/prathamkode/particle-1.6
Add particle-1.6 weights (no SFT dataset)
Browse files- README.md +23 -6
- chat_template.jinja +5 -0
- config.json +32 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +13 -0
README.md
CHANGED
|
@@ -13,15 +13,31 @@ tags:
|
|
| 13 |
|
| 14 |
~100M Llama-style chat model, trained from scratch (same architecture as [particle-1.0](https://huggingface.co/prathamkode/particle-1.0)).
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Status (2026-08-23)
|
| 19 |
|
| 20 |
- Pretrain: FineWeb-Edu, ~2B tokens (same base as 1.0)
|
| 21 |
-
- SFT
|
| 22 |
-
- Mix: ~37k NCERT Q&A + ~1k manners + fact seeds + 60k code-filtered [smol-smoltalk](https://huggingface.co/datasets/HuggingFaceTB/smol-smoltalk) (**94,681** pairs)
|
| 23 |
- Informal smoke: `hello` greets and stops; facts still miss (e.g. capital of India → Kolkata)
|
| 24 |
-
-
|
| 25 |
|
| 26 |
## Model details
|
| 27 |
|
|
@@ -29,7 +45,8 @@ tags:
|
|
| 29 |
- **Parameters:** 109.5M (12 layers, 768 hidden, 12 heads)
|
| 30 |
- **Context:** 2048 tokens
|
| 31 |
- **Tokenizer:** custom byte-level BPE, 32k vocab
|
| 32 |
-
- **
|
|
|
|
| 33 |
|
| 34 |
## Intended use
|
| 35 |
|
|
@@ -41,4 +58,4 @@ Very small capacity. Hallucinates. English-centric. No RLHF.
|
|
| 41 |
|
| 42 |
## Citation
|
| 43 |
|
| 44 |
-
Cite FineWeb-Edu / smol-smoltalk if you use the data.
|
|
|
|
| 13 |
|
| 14 |
~100M Llama-style chat model, trained from scratch (same architecture as [particle-1.0](https://huggingface.co/prathamkode/particle-1.0)).
|
| 15 |
|
| 16 |
+
Weights are MIT. The NCERT / teacher JSONL is **not** on this page.
|
| 17 |
+
|
| 18 |
+
## Usage
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 22 |
+
|
| 23 |
+
repo = "prathamkode/particle-1.6"
|
| 24 |
+
tok = AutoTokenizer.from_pretrained(repo)
|
| 25 |
+
model = AutoModelForCausalLM.from_pretrained(repo)
|
| 26 |
+
|
| 27 |
+
messages = [{"role": "user", "content": "hello"}]
|
| 28 |
+
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 29 |
+
ids = tok(prompt, return_tensors="pt")
|
| 30 |
+
out = model.generate(**ids, max_new_tokens=64, do_sample=False)
|
| 31 |
+
print(tok.decode(out[0], skip_special_tokens=False))
|
| 32 |
+
```
|
| 33 |
|
| 34 |
## Status (2026-08-23)
|
| 35 |
|
| 36 |
- Pretrain: FineWeb-Edu, ~2B tokens (same base as 1.0)
|
| 37 |
+
- SFT from that pretrain on AWS Spot (`g6e.12xlarge`, 4× L40S)
|
| 38 |
+
- Mix: ~37k NCERT Q&A + ~1k manners + fact seeds + 60k code-filtered [smol-smoltalk](https://huggingface.co/datasets/HuggingFaceTB/smol-smoltalk) (**94,681** pairs). Dataset files stay private.
|
| 39 |
- Informal smoke: `hello` greets and stops; facts still miss (e.g. capital of India → Kolkata)
|
| 40 |
+
- Public v1 weights remain at [prathamkode/particle-1.0](https://huggingface.co/prathamkode/particle-1.0)
|
| 41 |
|
| 42 |
## Model details
|
| 43 |
|
|
|
|
| 45 |
- **Parameters:** 109.5M (12 layers, 768 hidden, 12 heads)
|
| 46 |
- **Context:** 2048 tokens
|
| 47 |
- **Tokenizer:** custom byte-level BPE, 32k vocab
|
| 48 |
+
- **Precision:** Hub weights `bfloat16`
|
| 49 |
+
- **License:** MIT
|
| 50 |
|
| 51 |
## Intended use
|
| 52 |
|
|
|
|
| 58 |
|
| 59 |
## Citation
|
| 60 |
|
| 61 |
+
Cite FineWeb-Edu / smol-smoltalk if you use the data.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{% if message['role'] == 'user' %}<|user|>
|
| 2 |
+
{{ message['content'] }}
|
| 3 |
+
{% elif message['role'] == 'assistant' %}<|assistant|>
|
| 4 |
+
{{ message['content'] }}{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>
|
| 5 |
+
{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 0,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 768,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 2048,
|
| 15 |
+
"max_position_embeddings": 2048,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 12,
|
| 19 |
+
"num_hidden_layers": 12,
|
| 20 |
+
"num_key_value_heads": 12,
|
| 21 |
+
"pad_token_id": 1,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 10000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": true,
|
| 29 |
+
"transformers_version": "5.15.0",
|
| 30 |
+
"use_cache": true,
|
| 31 |
+
"vocab_size": 32000
|
| 32 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": 0,
|
| 4 |
+
"output_attentions": false,
|
| 5 |
+
"output_hidden_states": false,
|
| 6 |
+
"pad_token_id": 1,
|
| 7 |
+
"transformers_version": "5.15.0",
|
| 8 |
+
"use_cache": true
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:411dc07e553a0708d1d87a5e1a0cc580b08bb94bc812454f53864327bca83164
|
| 3 |
+
size 219071992
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": null,
|
| 4 |
+
"eos_token": "<|endoftext|>",
|
| 5 |
+
"extra_special_tokens": [
|
| 6 |
+
"<|user|>",
|
| 7 |
+
"<|assistant|>"
|
| 8 |
+
],
|
| 9 |
+
"model_max_length": 2048,
|
| 10 |
+
"pad_token": "<|padding|>",
|
| 11 |
+
"tokenizer_class": "TokenizersBackend",
|
| 12 |
+
"unk_token": "<|unk|>"
|
| 13 |
+
}
|