File size: 2,476 Bytes
3e8fae6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model:
- mossez-systems/Mossez-100M-Base
tags:
- causal-lm
- code
- fill-in-the-middle
- llama
- research
- experimental
---

# Mossez-100M-Coder-Base

Mossez-100M-Coder-Base is an experimental 100M-parameter code completion and
fill-in-the-middle model continued-pretrained from
[`mossez-systems/Mossez-100M-Base`](https://huggingface.co/mossez-systems/Mossez-100M-Base).
It is a base model, not a chat or instruction-following assistant.

## Model details

| Property | Value |
|---|---:|
| Parameters | 100,098,048 |
| Architecture | Llama-compatible decoder-only Transformer |
| Layers / hidden size | 12 / 768 |
| Query / KV heads | 12 / 4 |
| Context length | 1,024 tokens |
| Vocabulary | 32,007 |
| Weight format | Safetensors, FP32 |
| License | Apache-2.0 |

The tokenizer extends the Mossez-100M-Base vocabulary with seven single-token chat/FIM markers.
Existing token IDs were not changed. The FIM markers are `<|fim_prefix|>` (32004),
`<|fim_middle|>` (32005), and `<|fim_suffix|>` (32006).

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "mossez-systems/Mossez-100M-Coder-Base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

prompt = "def fibonacci(n: int) -> list[int]:
"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
output = model.generate(**inputs, do_sample=False, max_new_tokens=96)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```

For fill-in-the-middle, render the prompt as
`<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>`.

## Training and evaluation

The model consumed 39,997,440 tokens in 9,765 finite optimizer steps without
corpus wraparound. Packed validation loss decreased monotonically from 2.572834
to 1.488147. See [TRAINING_REPORT.md](TRAINING_REPORT.md),
[EVALUATION.md](EVALUATION.md), and [DATASET_ATTRIBUTION.md](DATASET_ATTRIBUTION.md).

The released `model.safetensors` SHA-256 is
`aba529bf10ad9f3acb5294c8bc2b4c93d20d25c6cff3a235a8659503b9ac1837`.

## Limitations

This small research model is not production-ready. It can emit malformed or
insecure code, wrong constants, hallucinated APIs, repetition, and early EOS.
Its 1,024-token context is short, and the evaluation suite is narrow. Validate,
test, and sandbox every output. Do not use generated code without review.