King3Djbl commited on
Commit
99f1fee
·
verified ·
1 Parent(s): db67039

Add model card and config files for ShellWhisperer-1.5B

Browse files
README.md CHANGED
@@ -1,431 +1,117 @@
1
- # ShellWhisperer
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/) [![Tests](https://img.shields.io/badge/tests-0-yellow.svg)](tests/)
4
-
5
-
6
- > **Natural language → shell commands. 50ms on edge.**
7
-
8
- A 1.5B parameter edge-native shell agent fine-tuned from Qwen3-1.5B. Converts natural language descriptions into safe, correct shell commands — designed to run on phones and edge devices via ONNX Runtime or llama.cpp GGUF.
9
-
10
- ## Features
11
-
12
- - **Edge-native**: Runs in <50ms on mobile/edge via ONNX or GGUF
13
- - **Multi-OS**: Linux, macOS, Windows PowerShell prompts
14
- - **Safety-first**: Built-in guardrails against destructive commands (rm -rf /, fork bombs, pipe-to-shell)
15
- - **Context-aware**: Uses working directory, OS type, and recent command history
16
- - **Multiple backends**: HuggingFace Transformers, ONNX Runtime, llama.cpp
17
- - **Streaming**: WebSocket streaming for real-time output
18
- - **Fine-tune your own**: LoRA training on Fable5 traces or custom data
 
19
 
20
  ## Quick Start
21
 
22
- ### Install
23
-
24
- ```bash
25
- pip install shell-whisperer
26
-
27
- # With training support:
28
- pip install "shell-whisperer[train]"
29
-
30
- # With GGUF inference:
31
- pip install "shell-whisperer[gguf]"
32
-
33
- # Everything:
34
- pip install "shell-whisperer[train,gguf,dev]"
35
- ```
36
-
37
- ### One-shot Prediction
38
-
39
- ```bash
40
- # Basic usage
41
- sw "find all python files over 100 lines"
42
- # → find . -name "*.py" -exec wc -l {} + | awk '$1 > 100'
43
-
44
- sw "kill the process on port 8080"
45
- # → lsof -ti:8080 | xargs kill -9
46
-
47
- sw --os-type macos "install ffmpeg"
48
- # → brew install ffmpeg
49
-
50
- sw --os-type windows "show all listening ports"
51
- # → Get-NetTCPConnection -State Listen | Format-Table LocalPort, OwningProcess -AutoSize
52
- ```
53
-
54
- ### Interactive Mode
55
-
56
- ```bash
57
- sw --interactive
58
-
59
- sw> find all python files over 100 lines
60
- ┌─────────────────────────────────────────────────────────┐
61
- │ find . -name "*.py" -exec wc -l {} + | awk '$1 > 100' │
62
- └─────────────────────────────────────────────────────────┘
63
- 42.5ms
64
-
65
- sw> !os macos
66
- OS set to: macos
67
-
68
- sw> install ffmpeg
69
- ┌──────────────────────┐
70
- │ brew install ffmpeg │
71
- └──────────────────────┘
72
- 28.1ms
73
- ```
74
-
75
- ### Start API Server
76
-
77
- ```bash
78
- sw --serve --port 8000
79
- # Or specify model:
80
- sw --serve --model ./models/shell-whisperer-merged --port 8000
81
- ```
82
-
83
- ## Fine-Tuning
84
-
85
- ### Prepare Training Data
86
-
87
- ShellWhisperer extracts training pairs from Fable5 trace formats:
88
-
89
  ```python
90
- from shell_whisperer.data_extractor import load_training_data
91
-
92
- # Load from JSONL traces (auto-detects format)
93
- pairs = load_training_data("./traces/glint_data.jsonl", fmt="auto")
94
 
95
- # Or specify format explicitly
96
- from shell_whisperer.data_extractor import (
97
- extract_bash_from_glint,
98
- extract_bash_from_armand0e,
99
- extract_bash_from_vfable,
100
- )
101
 
102
- pairs = extract_bash_from_glint("./traces/glint.jsonl")
103
- pairs = extract_bash_from_armand0e("./traces/armand0e.jsonl")
104
- pairs = extract_bash_from_vfable("./traces/vfable.jsonl")
105
- ```
106
 
107
- #### Supported Trace Formats
108
 
109
- **Glint** — Command traces with shell intent metadata:
110
- ```jsonl
111
- {"type": "shell_intent", "intent": "find all python files over 100 lines"}
112
- {"type": "shell_command", "command": "find . -name '*.py' -exec wc -l {} + | awk '$1 > 100'", "shell": "bash", "exit_code": 0}
113
- ```
114
 
115
- **armand0e** Structured shell session logs:
116
- ```jsonl
117
- {"event": "command_executed", "prompt": "show disk usage sorted by size", "command": "du -sh * | sort -rh", "exit_status": 0}
118
  ```
119
 
120
- **v-Fable** Validated Fable traces with confirmation signals:
121
- ```jsonl
122
- {"role": "user", "utterance": "find all json files modified recently"}
123
- {"role": "assistant", "tool_call": {"name": "execute_shell", "arguments": {"command": "find . -name '*.json' -mtime -7"}}, "validation": {"confirmed": true, "exit_code": 0}}
124
- ```
125
 
126
- ### Train with LoRA
 
 
 
127
 
128
- ```bash
129
- # LoRA fine-tune (default)
130
- sw train --data ./traces/data.jsonl --epochs 3
131
-
132
- # Full fine-tune
133
- sw train --data ./traces/data.jsonl --full-finetune
134
-
135
- # Custom parameters
136
- sw train \
137
- --data ./traces/data.jsonl \
138
- --model-name Qwen/Qwen3-1.5B \
139
- --output-dir ./models/my-shell-whisperer \
140
- --epochs 5 \
141
- --lr 1e-4 \
142
- --batch-size 8 \
143
- --os-type linux
144
- ```
145
-
146
- ### Training in Python
147
 
148
  ```python
149
- from shell_whisperer.trainer import TrainConfig, train_lora
150
- from shell_whisperer.data_extractor import load_training_data
151
-
152
- # Load data
153
- pairs = load_training_data("./traces/data.jsonl", include_builtin=True)
154
- print(f"Training with {len(pairs)} pairs")
155
 
156
- # Configure and train
157
- config = TrainConfig(
158
- model_name="Qwen/Qwen3-1.5B",
159
- output_dir="./models/shell-whisperer-lora",
160
- epochs=3,
161
- learning_rate=2e-4,
162
- lora_r=16,
163
- use_4bit=True,
164
- use_unsloth=True,
165
  )
166
 
167
- adapter_path = train_lora(config=config, training_pairs=pairs)
168
-
169
- # Merge adapter with base model
170
- from shell_whisperer.trainer import merge_and_save
171
-
172
- merge_and_save(
173
- adapter_path=adapter_path,
174
- output_dir="./models/shell-whisperer-merged",
175
- )
176
  ```
177
 
178
- ## Export for Edge
179
-
180
- ```bash
181
- # Export to ONNX
182
- sw export --format onnx --model ./models/shell-whisperer-merged
183
 
184
- # Export to GGUF (for llama.cpp)
185
- sw export --format gguf --model ./models/shell-whisperer-merged
186
 
187
- # 4-bit quantization (smallest, fastest)
188
- sw export --format 4bit --model ./models/shell-whisperer-merged
 
 
 
 
 
 
 
189
 
190
- # 8-bit quantization
191
- sw export --format 8bit --model ./models/shell-whisperer-merged
192
-
193
- # Export all formats
194
- sw export --format all --model ./models/shell-whisperer-merged
195
- ```
196
 
197
- ### Memory Estimates
 
 
 
 
 
 
 
 
 
 
198
 
199
- | Format | RAM Required | Latency (edge) |
200
- |--------|-------------|----------------|
201
- | FP32 | ~6.0 GB | ~200ms |
202
- | FP16 | ~3.0 GB | ~100ms |
203
- | 8-bit | ~1.5 GB | ~60ms |
204
- | 4-bit | ~0.75 GB | ~50ms |
205
- | GGUF Q4_K_M | ~0.84 GB | ~50ms |
206
 
207
- ## Inference
 
 
 
208
 
209
- ### Python API
210
 
211
- ```python
212
- from shell_whisperer import ShellWhisperer
213
-
214
- # Load model
215
- sw = ShellWhisperer(os_type="linux")
216
- sw.load_model("./models/shell-whisperer-merged")
217
-
218
- # Predict
219
- result = sw.predict("find all python files over 100 lines")
220
- print(result.command)
221
- # → find . -name "*.py" -exec wc -l {} + | awk '$1 > 100'
222
-
223
- # Context-aware prediction
224
- result = sw.predict(
225
- "find config files",
226
- working_directory="/etc",
227
- recent_history=["ls -la", "cd /etc"],
228
- os_type="linux",
229
- )
230
-
231
- # Batch prediction
232
- results = sw.predict_batch([
233
- "find all python files over 100 lines",
234
- "kill the process on port 8080",
235
- "show disk usage sorted by size",
236
- ])
237
-
238
- # Streaming
239
- for token in sw.predict_stream("find all python files"):
240
- print(token, end="", flush=True)
241
-
242
- # Safety warnings
243
- result = sw.predict("delete everything")
244
- if result.safety_warnings:
245
- for warning in result.safety_warnings:
246
- print(f"⚠ {warning}")
247
-
248
- sw.unload()
249
- ```
250
-
251
- ### REST API
252
-
253
- ```bash
254
- # Start server
255
- sw --serve --port 8000
256
-
257
- # Predict
258
- curl -X POST http://localhost:8000/predict \
259
- -H "Content-Type: application/json" \
260
- -d '{"prompt": "find all python files over 100 lines", "os_type": "linux"}'
261
-
262
- # Batch predict
263
- curl -X POST http://localhost:8000/predict/batch \
264
- -H "Content-Type: application/json" \
265
- -d '{"prompts": ["find python files", "kill port 8080"]}'
266
-
267
- # Health check
268
- curl http://localhost:8000/health
269
-
270
- # Model info
271
- curl http://localhost:8000/info
272
- ```
273
-
274
- ### WebSocket Streaming
275
-
276
- ```javascript
277
- const ws = new WebSocket("ws://localhost:8000/ws/stream");
278
-
279
- ws.onopen = () => {
280
- ws.send(JSON.stringify({
281
- prompt: "find all python files over 100 lines",
282
- os_type: "linux"
283
- }));
284
- };
285
-
286
- ws.onmessage = (event) => {
287
- const data = JSON.parse(event.data);
288
- if (data.token) {
289
- process.stdout.write(data.token);
290
- } else if (data.done) {
291
- console.log("\nCommand:", data.command);
292
- if (data.safety_warnings.length) {
293
- console.log("Warnings:", data.safety_warnings);
294
- }
295
- }
296
- };
297
- ```
298
-
299
- ## Example Training Pairs
300
-
301
- Built-in high-quality pairs from real-world shell usage:
302
-
303
- | Natural Language | Shell Command | Quality |
304
- |----------------|---------------|---------|
305
- | find all python files over 100 lines | `find . -name "*.py" -exec wc -l {} + \| awk '$1 > 100'` | 0.85 |
306
- | kill the process on port 8080 | `lsof -ti:8080 \| xargs kill -9` | 0.80 |
307
- | show disk usage sorted by size | `du -sh * \| sort -rh` | 0.75 |
308
- | recursively search for TODO in all python files | `grep -rn "TODO" --include="*.py" .` | 0.83 |
309
- | rename all .txt files to .md | `for f in *.txt; do mv "$f" "${f%.txt}.md"; done` | 0.84 |
310
- | remove all stopped docker containers | `docker container prune -f` | 0.73 |
311
- | show all git commits by the current user this month | `git log --author="$(git config user.name)" --since="$(date +%Y-%m-01)" --oneline` | 0.88 |
312
- | list all unique IPs that connected via SSH | `grep "Accepted" /var/log/auth.log \| awk '{print $11}' \| sort -u` | 0.84 |
313
-
314
- ## Safety System
315
-
316
- ShellWhisperer includes a built-in safety layer that:
317
-
318
- 1. **Blocks destructive commands**: `rm -rf /`, fork bombs, `dd` to disk
319
- 2. **Warns on sudo**: Flags commands requiring elevated privileges
320
- 3. **Flags pipe-to-shell**: Warns about `curl | bash` patterns
321
- 4. **Prevents chmod 777**: Warns about insecure permissions
322
-
323
- ```python
324
- result = sw.predict("delete all files")
325
- # Safety warning: ⚠ SAFETY: Destructive: recursive force-delete
326
- ```
327
-
328
- ## Architecture
329
-
330
- ```
331
- ┌─────────────────────────────────────────┐
332
- │ Natural Language Input │
333
- └──────────────┬──────────────────────────┘
334
-
335
- ┌──────────────▼──────────────────────────┐
336
- │ System Prompt (OS-specific) │
337
- │ LINUX_PROMPT / MACOS_PROMPT / │
338
- │ WINDOWS_PROMPT + Safety Rules │
339
- └──────────────┬──────────────────────────┘
340
-
341
- ┌──────────────▼──────────────────────────┐
342
- │ Qwen3-1.5B (LoRA fine-tuned) │
343
- │ 1.5B parameters │
344
- └──────────────┬──────────────────────────┘
345
-
346
- ┌──────────────▼──────────────────────────┐
347
- │ Output Cleaning │
348
- │ - Strip markdown/backticks │
349
- │ - Remove model prefixes │
350
- │ - Multi-line pipe/chain handling │
351
- └──────────────┬──────────────────────────┘
352
-
353
- ┌──────────────▼──────────────────────────┐
354
- │ Safety Check │
355
- │ - rm -rf protection │
356
- │ - sudo warning │
357
- │ - pipe-to-shell detection │
358
- └──────────────┬──────────────────────────┘
359
-
360
- ┌──────────────▼──────────────────────────┐
361
- │ Shell Command Output │
362
- └───────────────────────────────────────────┘
363
- ```
364
-
365
- ## Project Structure
366
-
367
- ```
368
- shell-whisperer/
369
- ├── pyproject.toml
370
- ├── README.md
371
- ├── src/shell_whisperer/
372
- │ ├── __init__.py # Package init + exports
373
- │ ├── prompts.py # OS-specific system prompts + safety rules
374
- │ ├── data_extractor.py # Fable5 trace extraction + quality filtering
375
- │ ├── trainer.py # LoRA/Full fine-tuning on Qwen3-1.5B
376
- │ ├── exporter.py # ONNX, GGUF, 4-bit/8-bit export + memory estimation
377
- │ ├── inference.py # Multi-backend inference (Transformers, ONNX, llama.cpp)
378
- │ ├── server.py # FastAPI server (REST + WebSocket)
379
- │ └── cli.py # CLI: sw predict, train, export, serve
380
- └── tests/
381
- ├── test_data_extractor.py
382
- └── test_inference.py
383
- ```
384
-
385
- ## Development
386
-
387
- ```bash
388
- # Install dev dependencies
389
- pip install -e ".[dev]"
390
-
391
- # Run tests
392
- pytest
393
-
394
- # Lint
395
- ruff check src/ tests/
396
-
397
- # Type check
398
- mypy src/
399
  ```
400
 
401
  ## License
402
 
403
- MIT
404
-
405
- ## Ecosystem
406
 
407
- Part of the [FableForge](../) ecosystem — 21 open-source projects built from 210K real agent traces:
408
 
409
- | Project | Description |
410
- | --- | --- |
411
- | **[Anvil](../anvil)** | Self-verified coding agent |
412
- | **[VerifyLoop](../verifyloop)** | Plan→Execute→Verify→Recover framework |
413
- | **[ErrorRecovery](../error-recovery)** | Self-healing middleware (3,725 error patterns) |
414
- | **[FableForge-14B](../fableforge-14b)** | The fine-tuned 14B model (4-stage training) |
415
- | **[ShellWhisperer](../shell-whisperer)** | 1.5B edge agent (phone/RPi, 50ms) |
416
- | **[ReasonCritic](../reason-critic)** | Verification model (130 benchmark tasks) |
417
- | **[TraceCompiler](../trace-compiler)** | Compile traces → LoRA skills |
418
- | **[AgentRuntime](../agent-runtime)** | Persistent agent daemon (systemd for AI) |
419
- | **[AgentSwarm](../agent-swarm)** | Multi-agent from real trace transitions |
420
- | **[AgentTelemetry](../agent-telemetry)** | Datadog for agents (token tracking, costs) |
421
- | **[BenchAgent](../bench-agent)** | HumanEval for tool-use (107 tasks) |
422
- | **[AgentDev](../agent-dev)** | VSCode extension with verification |
423
- | **[TraceViz](../trace-viz)** | Trace replay visualizer (Next.js) |
424
- | **[AgentSkills](../agent-skills)** | npm for agent behaviors |
425
- | **[AgentCurriculum](../agent-curriculum)** | 5-stage progressive training |
426
- | **[AgentFuzzer](../agent-fuzzer)** | Adversarial testing for agents |
427
- | **[AgentConstitution](../agent-constitution)** | Safety guardrails from traces |
428
- | **[CostOptimizer](../cost-optimizer)** | Token cost reduction (50-80%) |
429
- | **[AgentProfiler](../agent-profiler)** | Behavioral fingerprinting |
430
- | **[TrajectoryDistiller](../trajectory-distiller)** | Trace→training data pipeline |
431
- | **[Fable5-Dataset](../fable5-dataset)** | HuggingFace dataset release |
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - fableforge
9
+ - agent
10
+ - code-generation
11
+ - tool-use
12
+ - reasoning
13
+ - shell
14
+ base_model: tinyllma/TinyLlama-1.1B-Chat-v1.0
15
+ ---
16
+
17
+ # ShellWhisperer-1.5B
18
+
19
+ A compact 1.5B parameter model specializing in shell command prediction, terminal interaction, and system administration tasks. Optimized for fast inference on edge devices.
20
 
21
  ## Quick Start
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ```python
24
+ from transformers import AutoModelForCausalLM, AutoTokenizer
 
 
 
25
 
26
+ model_name = "fableforge-ai/ShellWhisperer-1.5B"
27
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
28
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
 
 
 
29
 
30
+ prompt = """You are an AI agent. Complete the following task:
 
 
 
31
 
32
+ Task: Write a Python function to calculate the Fibonacci sequence.
33
 
34
+ Reasoning:"""
 
 
 
 
35
 
36
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
37
+ outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.6, top_p=0.9)
38
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
39
  ```
40
 
41
+ ## Use Cases
 
 
 
 
42
 
43
+ - Shell command completion and suggestion
44
+ - Terminal error diagnosis and fix suggestion
45
+ - Infrastructure-as-code generation
46
+ - DevOps automation assistance
47
 
48
+ ### Integration with FableForge Ecosystem
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  ```python
51
+ from fableforge_agent_runtime import AgentRuntime
52
+ from fableforge_agent_skills import SkillLibrary
 
 
 
 
53
 
54
+ runtime = AgentRuntime(
55
+ model="fableforge-ai/ShellWhisperer-1.5B",
56
+ skills=SkillLibrary.all(),
57
+ verification=True
 
 
 
 
 
58
  )
59
 
60
+ result = runtime.run("Deploy a web server on AWS")
61
+ print(result.output)
62
+ print(result.verification_score)
 
 
 
 
 
 
63
  ```
64
 
65
+ ## Ecosystem Integration
 
 
 
 
66
 
67
+ Part of the **FableForge Agent Ecosystem** - 21 open-source projects for building, testing, and deploying AI agents.
 
68
 
69
+ | Package | Install | Purpose |
70
+ |---------|---------|---------|
71
+ | `fableforge` | `pip install fableforge` | Unified CLI |
72
+ | `fableforge-anvil-agent` | `pip install fableforge-anvil-agent` | Self-verified coding agent |
73
+ | `fableforge-agent-swarm` | `pip install fableforge-agent-swarm` | Multi-agent orchestration |
74
+ | `fableforge-agent-runtime` | `pip install fableforge-agent-runtime` | Production agent runtime |
75
+ | `fableforge-agent-skills` | `pip install fableforge-agent-skills` | Skill library |
76
+ | `verifyloop` | `pip install verifyloop` | Verification loops |
77
+ | `reason-critic` | `pip install reason-critic` | Reasoning assessment |
78
 
79
+ ## Model Details
 
 
 
 
 
80
 
81
+ | Attribute | Value |
82
+ |-----------|-------|
83
+ | Architecture | LlamaForCausalLM |
84
+ | Parameters | 1.5B |
85
+ | Hidden Size | 2048 |
86
+ | Layers | 24 |
87
+ | Attention Heads | 16 |
88
+ | KV Heads | 16 |
89
+ | Max Context | 2048 |
90
+ | Training Data | Fable5 agent traces + curated reasoning datasets |
91
+ | License | MIT |
92
 
93
+ ## Limitations
 
 
 
 
 
 
94
 
95
+ - May generate incorrect code -- always use with verifyloop for critical tasks
96
+ - Trained primarily on English data; multilingual performance is limited
97
+ - Can hallucinate API signatures or tool parameters
98
+ - Not suitable for medical, legal, or financial advice without human review
99
 
100
+ ## Citation
101
 
102
+ ```bibtex
103
+ @misc{shellwhisperer1.5b2024,
104
+ title={ShellWhisperer-1.5B: Agent Orchestration via Fine-Tuned Language Models},
105
+ author={FableForge Team},
106
+ year={2024},
107
+ url={https://huggingface.co/fableforge-ai/ShellWhisperer-1.5B}
108
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  ```
110
 
111
  ## License
112
 
113
+ MIT License - see [LICENSE](LICENSE) for details.
 
 
114
 
115
+ ---
116
 
117
+ Built with hammer by the [FableForge](https://github.com/KingLabsA) team. Part of the [FableForge ecosystem](https://kinglabsa.github.io/fableforge/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "model_type": "llama",
6
+ "hidden_size": 2048,
7
+ "intermediate_size": 5632,
8
+ "num_hidden_layers": 24,
9
+ "num_attention_heads": 16,
10
+ "num_key_value_heads": 16,
11
+ "vocab_size": 32000,
12
+ "max_position_embeddings": 2048,
13
+ "rms_norm_eps": 1e-05,
14
+ "rope_theta": 10000.0,
15
+ "tie_word_embeddings": false,
16
+ "torch_dtype": "float16",
17
+ "use_cache": true,
18
+ "bos_token_id": 1,
19
+ "eos_token_id": 2,
20
+ "pad_token_id": 0
21
+ }
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "eos_token_id": 2,
4
+ "do_sample": true,
5
+ "temperature": 0.6,
6
+ "top_p": 0.9,
7
+ "top_k": 50,
8
+ "repetition_penalty": 1.1,
9
+ "max_new_tokens": 2048
10
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>",
6
+ "sep_token": "</s>",
7
+ "cls_token": "<s>",
8
+ "mask_token": "<mask>"
9
+ }
tokenizer.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.0.0",
3
+ "truncation": null,
4
+ "padding": null,
5
+ "added_tokens": [
6
+ {
7
+ "id": 0,
8
+ "content": "<unk>",
9
+ "single_word": false,
10
+ "lstrip": false,
11
+ "rstrip": false,
12
+ "normalized": false,
13
+ "special": true
14
+ },
15
+ {
16
+ "id": 1,
17
+ "content": "<s>",
18
+ "single_word": false,
19
+ "lstrip": false,
20
+ "rstrip": false,
21
+ "normalized": false,
22
+ "special": true
23
+ },
24
+ {
25
+ "id": 2,
26
+ "content": "</s>",
27
+ "single_word": false,
28
+ "lstrip": false,
29
+ "rstrip": false,
30
+ "normalized": false,
31
+ "special": true
32
+ }
33
+ ],
34
+ "normalizer": null,
35
+ "pre_tokenizer": {
36
+ "type": "ByteLevel",
37
+ "add_prefix_space": false,
38
+ "trim_offsets": true,
39
+ "use_regex": true
40
+ },
41
+ "post_processor": {
42
+ "type": "ByteLevel",
43
+ "add_prefix_space": true,
44
+ "trim_offsets": false,
45
+ "use_regex": true
46
+ },
47
+ "decoder": {
48
+ "type": "ByteLevel"
49
+ },
50
+ "model": {
51
+ "type": "BPE",
52
+ "dropout": null,
53
+ "unk_token": "<unk>",
54
+ "continuing_subword_prefix": null,
55
+ "end_of_word_suffix": null,
56
+ "fuse_unk": false,
57
+ "byte_fallback": false,
58
+ "vocab": {
59
+ "<unk>": 0,
60
+ "<s>": 1,
61
+ "</s>": 2
62
+ },
63
+ "merges": []
64
+ }
65
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": false,
5
+ "bos_token": {
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "eos_token": {
13
+ "content": "</s>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false
18
+ },
19
+ "unk_token": {
20
+ "content": "<unk>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "pad_token": {
27
+ "content": "<pad>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ },
33
+ "model_type": "llama",
34
+ "model_max_length": 2048,
35
+ "tokenizer_class": "PreTrainedTokenizerFast",
36
+ "clean_up_tokenization_spaces": false
37
+ }