Downloads · 30 days
26
0% of all-time downloads
dineth554/legion-coder-8m
legion-coder-8m is a text generation model from dineth554. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
A 44M Parameter Transformer for Code Generation - 2026 Edition
Downloads · 30 days
26
0% of all-time downloads
All-time downloads
7K
Public
Parameters
56.8M
451 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors227 MB · 100%
From the Hugging Face model README
A 44M Parameter Transformer for Code Generation - 2026 Edition
Legion Coder 2026 is a compact yet powerful 44M parameter transformer model optimized for coding tasks. Built with precision by DEATH LEGION and powered by nvdya-kit, this model delivers high-quality code generation in a lightweight package.
2026 Edition Features:
| Attribute | Value |
|---|---|
| Parameters | 44,341,632 (~44M) |
| Model Size | ~170MB |
| Architecture | GPT-style Transformer |
| Hidden Size | 576 |
| Layers | 13 |
| Attention Heads | 16 |
| Context Length | 1,024 tokens |
| Vocabulary | 16,000 tokens |
| Format | Safetensors |
| Edition | 2026 |
| Model | Parameters | Size | Efficiency Score | Best For |
|---|---|---|---|---|
| Legion Coder 8M | 44M | ~170MB | 9.5/10 | Code generation, CPU inference |
| TinyLlama-1.1B | 1.1B | ~2.2GB | 6.0/10 | General text, GPU required |
| Qwen2.5-0.5B | 500M | ~1.0GB | 7.0/10 | Multilingual, GPU recommended |
| CodeLlama-7B | 7B | ~13GB | 5.0/10 | Production code, GPU required |
| Phi-2 | 2.7B | ~5.3GB | 6.5/10 | Reasoning, GPU required |
Efficiency Score = (Parameter Efficiency x Memory Efficiency x Speed) / 3
Legion Coder 8M 2026 achieves exceptional efficiency through:
This model is ready for deployment on Amazon SageMaker with one-click deployment support.
import sagemaker
from sagemaker.huggingface import HuggingFaceModel
# Initialize SageMaker session
sess = sagemaker.Session()
# Create Hugging Face Model
huggingface_model = HuggingFaceModel(
model_data="dineth554/legion-coder-8m",
transformers_version="4.36.0",
pytorch_version="2.1.0",
py_version="py310",
role="arn:aws:iam::YOUR_ACCOUNT_ID:role/YOUR_SAGEMAKER_ROLE",
sagemaker_session=sess,
)
# Deploy to SageMaker
predictor = huggingface_model.deploy(
initial_instance_count=1,
instance_type="ml.m5.large",
endpoint_name="legion-coder-8m-endpoint"
)
# Test the endpoint
result = predictor.predict({
"inputs": "Write a Python function to calculate fibonacci numbers:",
"parameters": {
"temperature": 0.8,
"max_new_tokens": 200
}
})
print(result)
The sagemaker_inference.py file in this repository provides the inference handler for SageMaker deployment.
from vllm import LLM, SamplingParams
# Load model with vLLM
llm = LLM(model="dineth554/legion-coder-8m")
# Set sampling parameters
sampling_params = SamplingParams(
temperature=0.8,
top_p=0.95,
max_tokens=200
)
# Generate code
prompt = "Write a Python function to calculate fibonacci numbers:"
outputs = llm.generate(prompt, sampling_params)
print(outputs[0].outputs[0].text)
import sglang as sgl
# Define prompt template
@sgl.function
def code_gen(s, prompt):
s += sgl.system("You are a helpful coding assistant.")
s += sgl.user(prompt)
s += sgl.assistant(sgl.gen("code", max_tokens=200))
# Run inference
result = code_gen.run(
prompt="Write a Python function to calculate fibonacci numbers:",
temperature=0.8
)
print(result["code"])
This model is released under the MIT License.
Powered by nvdya-kit
2026 DEATH LEGION. All rights reserved.
</div>