Text Generation
Transformers
Safetensors
llama
causal-lm
code
fill-in-the-middle
research
experimental
text-generation-inference
Instructions to use mossez-systems/Mossez-100M-Coder-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mossez-systems/Mossez-100M-Coder-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mossez-systems/Mossez-100M-Coder-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mossez-systems/Mossez-100M-Coder-Base") model = AutoModelForCausalLM.from_pretrained("mossez-systems/Mossez-100M-Coder-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mossez-systems/Mossez-100M-Coder-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mossez-systems/Mossez-100M-Coder-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mossez-systems/Mossez-100M-Coder-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mossez-systems/Mossez-100M-Coder-Base
- SGLang
How to use mossez-systems/Mossez-100M-Coder-Base 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 "mossez-systems/Mossez-100M-Coder-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mossez-systems/Mossez-100M-Coder-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "mossez-systems/Mossez-100M-Coder-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mossez-systems/Mossez-100M-Coder-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mossez-systems/Mossez-100M-Coder-Base with Docker Model Runner:
docker model run hf.co/mossez-systems/Mossez-100M-Coder-Base
| 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. | |