Model Description
- Model: Fidel Law 1
- Developer: Fideliz AI
- AI Team Lead: Yisak Bule
- Country: Ethiopia 🇪🇹
- Model type: LLaMA-style decoder-only causal language model
- Parameters: ~23 million
- Primary language: Amharic
- Domain: Ethiopian law
- Primary legal domains: Criminal Law and Commercial Law
- Base: Fideliz AI's internally developed base model
- Tokenizer: Custom Ge'ez/Amharic BPE tokenizer
- Vocabulary: 8,000 tokens
- Maximum context: 100 tokens
- Training objective: Causal language modeling
- Legal adaptation: Supervised training on Ethiopian legal data
- License: Apache 2.0
No External Foundation Model
An Important Distinction
Fidel Law 1 should not be described as:
“A 23M model fine-tuned from our base pretrained model.”
That description would incorrectly suggest that Fideliz AI started with an external foundation model.
Instead:
Fidel Law 1 is a 23M-parameter legal language model developed on Fideliz AI's own internally developed base model.
The legal model was built using Fideliz AI's own model-development pipeline and legal training data.
The distinction is important because building from scratch is a core part of Fideliz AI's research mission.
Our objective is to develop the underlying AI technology ourselves rather than simply adapting an existing foreign foundation model.
Data and Development Pipeline
The Fidel Law 1 development process covers the full model-development pipeline.
Ethiopian Legal Sources ↓Data Collection ↓Data Cleaning & Preparation ↓Legal Dataset Construction ↓Question & Reasoning Data ↓Data Validation & Evaluation ↓Amharic Tokenizer ↓Fideliz AI Base Model ↓Legal Supervised Training ↓Fidel Law 1 ↓Evaluation & Error Analysis ↓Model Improvement
The purpose of this pipeline is to create an AI model that understands Ethiopian legal language rather than simply reproducing generic language-model behavior.
Uses
Direct Use
Fidel Law 1 is designed for:
- Amharic legal question answering
- Ethiopian Criminal Code article retrieval
- Ethiopian legal article identification
- Legal concept lookup
- Short legal explanations
- Case-to-article reasoning
- Article-to-concept mapping
- Concept-to-article mapping
- Ethiopian legal NLP research
The model performs best with short, direct legal questions in Amharic.
Downstream Use
Potential applications include:
- Ethiopian legal search systems
- Amharic legal assistants
- Legal education tools
- Legal research systems
- Legal article retrieval
- Legal document indexing
- Ethiopian legal NLP research
- Retrieval-augmented legal systems
- Legal AI evaluation
Out-of-Scope Use
Fidel Law 1 should not be used as the sole basis for:
- Court decisions
- Legal representation
- Professional legal advice
- Criminal sentencing
- Government enforcement decisions
- Automated legal decisions
- Determining legal rights without verification
Model Architecture
Table with columns: Property, Value| Property | Value |
|---|
| Parameters | ~22M |
| Architecture | LLaMA-style decoder-only Transformer |
| Layers | 8 |
| Hidden size | 512 |
| Attention heads | 8 |
| Key/Value heads | 4 |
| Vocabulary size | 8,000 |
| Maximum context | 100 tokens |
| Language | Amharic |
Training Data
The legal training data focuses primarily on Ethiopian legislation and legal reasoning.
Major areas include:
- Ethiopian Criminal Code
- Commercial Code of Ethiopia 2021
- Ethiopian legal terminology
- Legal article descriptions
- Legal question-answer pairs
- Case-to-article examples
- Article identification
- Legal concept mapping
- Short legal reasoning examples
The project emphasizes locally relevant Ethiopian legal data rather than relying exclusively on generic multilingual legal datasets.
Training Procedure
Fidel Law 1 was developed using Fideliz AI's internally developed base model and training pipeline.
The training process involved multiple stages, including:
- Development of the base model
- Ethiopian legal data collection
- Legal data preprocessing
- Dataset construction
- Amharic tokenizer preparation
- Supervised legal training
- Evaluation
- Error analysis
- Iterative improvement
The legal training stage teaches the internally developed base model to specialize in Ethiopian legal language and legal question answering.
Preprocessing
Legal text was transformed into structured training examples covering:
- Direct legal questions
- Concept-based questions
- Article-based questions
- Case-to-article questions
- Article-to-concept questions
- Concept-to-article questions
- Legal interpretation questions
- Short-form legal explanations
The training data was designed to encourage the model to identify and reference relevant legal provisions.
Evaluation
Fidel Law 1 was evaluated using internally constructed Ethiopian legal evaluation datasets.
Evaluation Results
Table with columns: Evaluation, Result| Evaluation | Result |
|---|
| General Legal Retrieval | 96% |
| Criminal Code Case-to-Article | **95.50% ** |
| Bidirectional Article Mapping | **100% ** |
| Direct Article Identification, Arts. 1–865 | **86.67% ** |
| Complex Case-to-Article Reasoning | **85% ** |
These are internal empirical evaluations and are not standardized external benchmarks.
Evaluation Tasks
General Legal Retrieval
Tests whether the model can identify the relevant legal provision from a natural-language legal question.
Case-to-Article
Tests whether the model can map a described legal situation to the relevant Ethiopian Criminal Code article.
Bidirectional Mapping
Tests both:
Article → Legal ConceptLegal Concept → Article
Direct Article Identification
Tests whether the model can identify specific legal provisions when directly queried.
Complex Case-to-Article Reasoning
Tests more difficult legal scenarios requiring the model to connect facts with the relevant legal provision.
Example Model Outputs 🇪🇹
The following examples demonstrate Fidel Law 1's Amharic legal question-answering behavior.
Example 1
🗣️ ጥያቄ 1:
አንቀጽ 1 ዓላማው ምንድነው?
🤖 መልስ:
የወንጀል ሕግ ዓላማ የአገሪቱን መንግሥት፣ የሕዝቦቹን፣ የነዋሪዎቹን፣ ሰላም፣ ደህንነት፣ ሥርዓት፣ መብትና ጥቅም መጠበቅና ማረጋገጥ ነው። [SOURCE: 1]
Example 2
🗣️ ጥያቄ 2:
የወንጀል ሕግ ግብ ምንድን ነው?
🤖 መልስ:
ወንጀል እንዳይፈጸም መከላከል ነው [ARTICLE: 1]።
Example 3
🗣️ ጥያቄ 3:
ፍርድ ቤት ያልተደነገገ ድርጊትን ወንጀል ማድረግ ይችላል?
🤖 መልስ:
አይችልም። 2(2) መሠረት ሕገወጥነቱ በሕግ ያልተደነገገ ድርጊት ወይም ግድፈት እንደወንጀል ሊቆጠርና ቅጣት ሊወሰንበት አይችልም። [SOURCE: 2]
Example 4
🗣️ ጥያቄ 4:
ሕጉ አሻሚ ከሆነ ምን ይደረጋል?
🤖 መልስ:
2(4) መሠረት ፍርድ ቤቱ በሕግ አውጪው ባቀደው ትርጉምና በሕጉ መንፈስ መሠረት መተርጐም አለበት። [SOURCE: 2]
Example 5
🗣️ ጥያቄ 5:
አንቀጽ 4 ለማን ይሠራል?
🤖 መልስ:
አንቀጽ 4 የሕግ ፊት እኩልነትን ይመለከታል። [SOURCE: 4]
Example 6
🗣️ ጥያቄ 6:
በጾታ ልዩነት ይደረጋል?
🤖 መልስ:
የወንጀል ሕግ የጾታን ልዩነት ሳያደርግ በሁሉም ላይ በእኩልነት ተፈፃሚ ይሆናል። [SOURCE: 4]
Example 7
🗣️ ጥያቄ 7:
አዲሱ ሕግ ቀድሞ ለተፈፀመ ድርጊት ይሠራል?
🤖 መልስ:
አንቀጽ 5 የወንጀል ሕግ ወደኋላ ተመልሶ የማይሠራ መሆኑን ይደነግጋል። [SOURCE: 5]
Example 8
🗣️ ጥያቄ 8:
6 ላይ የተሻለ ሕግ ማን ይወስናል?
🤖 መልስ:
ፍርድ ቤቱ ይወስናል። [SOURCE: 6]
Example 9
🗣️ ጥያቄ 9:
7 የትኛው ድንጋጌ ይተገበራል?
🤖 መልስ:
የዚህ ሕግ ድንጋጌዎች ከአንቀጽ 129 እስከ 185 ተፈፃሚ ይሆናሉ። [SOURCE: 7]
Example 10
🗣️ ጥያቄ 10:
የግል አቤቱታ መብት መቼ ቀሪ ይሆናል?
🤖 መልስ:
ይህ ሕግ ከፀናበት ጊዜ ጀምሮ በሁለት ዓመት ውስጥ አቤቱታ አቅራቢው መብቱን ካልተጠቀመበት ቀሪ ይሆናል። [SOURCE: 8(2)]
Context Length
Fidel Law 1 has a maximum context length of 100 tokens.
The current version is therefore optimized for:
- Short questions
- Short legal queries
- Direct legal Q&A
- Article retrieval
- Concise legal responses
It is not designed for long legal documents or extended conversations.
Model Behavior
Fidel Law 1 is designed to produce concise legal answers.
When possible, responses provide:
- A direct answer
- The relevant article
- A short explanation
- A source reference
Example:
የወንጀል ሕግ ወደኋላ ተመልሶ አይሠራም። [SOURCE: 5]
Limitations and Risks
Known limitations include:
- Very small context window
- Potential hallucinations
- Possible incorrect article references
- Sensitivity to question wording
- Limited long-context reasoning
- Limited conversational capability
- Limited coverage outside the training domain
- Internal evaluation datasets are relatively small
- Results are not standardized external benchmarks
The model should therefore be treated as an experimental Ethiopian legal AI research model.
Legal Disclaimer
Fidel Law 1 is an experimental research model and is not a source of binding legal advice.
Model outputs can contain errors, omissions, incorrect interpretations, or incorrect article references.
Always verify legal information against authoritative Ethiopian legal sources and applicable legislation before relying on an output for legal, professional, governmental, judicial, or other consequential purposes.
How to Get Started
from transformers import AutoTokenizer, AutoModelForCausalLMimport torch repo_id = "yisberh/fidel_law_1"device = torch.device("cuda" if torch.cuda.is_available() else "cpu") tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained(repo_id).to(device)model.eval() prompt = ( "<|im_start|>user\n" "አንቀጽ 1 ዓላማው ምንድነው?" "<|im_end|>\n" "<|im_start|>assistant\n") # ==============================================================================# 🛠️ THE FIX: BYPASS THE BUGGY `tokenizer()` WRAPPER# ==============================================================================bos_id = tokenizer.bos_token_ideos_id = tokenizer.eos_token_idim_end_id = tokenizer.convert_tokens_to_ids("<|im_end|>") blocked_tokens = [ tokenizer.convert_tokens_to_ids("<|im_start|>"), tokenizer.convert_tokens_to_ids("<|system|>"), tokenizer.convert_tokens_to_ids("<|user|>"), tokenizer.convert_tokens_to_ids("<|assistant|>")] # 1. Encode manually and prepend the BOS tokeninput_ids = [bos_id] + tokenizer.encode(prompt, add_special_tokens=False) # 2. Build the PyTorch tensors manuallyinput_tensor = torch.tensor([input_ids], dtype=torch.long, device=device)attention_mask = torch.ones_like(input_tensor, device=device) with torch.no_grad(): outputs = model.generate( input_ids=input_tensor, attention_mask=attention_mask, max_new_tokens=80, pad_token_id=eos_id, eos_token_id=[eos_id, im_end_id], do_sample=False, # Pure argmax for factual legal text suppress_tokens=blocked_tokens # Prevents structural token bleeding ) # Extract only the assistant's newly generated tokensinput_length = input_tensor.shape[1]generated_ids = outputs[0][input_length:] response = tokenizer.decode(generated_ids).strip().replace("<|im_end|>", "")print(response)
Generation Configuration
For deterministic legal retrieval and evaluation:
outputs = model.generate( **inputs, max_new_tokens=80, do_sample=False)
Deterministic generation can make evaluation and reproducibility easier.
Environmental Impact
Detailed carbon-emission measurements are not currently available for this release.
- Hardware: GPU-based training
- Cloud Provider: Not specified
- Compute Region: Not specified
- Carbon Emissions: Not measured
Technical Specifications
Architecture
Fidel Law 1 uses a decoder-only Transformer architecture developed within Fideliz AI's model-development program.
The model contains:
- 8 Transformer layers
- 512-dimensional hidden representations
- 8 attention heads
- 4 key/value heads
- 8,000-token vocabulary
- 100-token maximum context
- Causal language modeling objective
The legal model was developed on top of the Fideliz AI internally developed base model.
Compute Infrastructure
GPU acceleration was used throughout model development and training.
Research Philosophy
Fidel Law 1 represents a broader research direction at Fideliz AI:
Build AI, don't just adapt AI.
Our objective is to develop the underlying model capabilities, training processes, datasets, evaluation systems, and domain-specific AI systems ourselves.
For Ethiopian AI, this means developing models that can understand Ethiopian languages, legal systems, culture, knowledge, and real-world contexts.
The long-term goal is to build increasingly capable African foundation models from the ground up.
Citation
If you use Fidel Law 1 in research, please cite:
BibTeX
@misc{bule2026fidellaw1, author = {Yisak Bule and Fideliz AI}, title = {Fidel Law 1: An Amharic Legal Language Model for Ethiopian Legal Text}, year = {2026}, howpublished = {Hugging Face}, url = {https://huggingface.co/yisberh/fidel_law_1}}
APA
Bule, Y., & Fideliz AI. (2026). Fidel Law 1: An Amharic Legal Language Model for Ethiopian Legal Text. Hugging Face.
Glossary
Fidel Law 1
An Amharic legal language model developed by Fideliz AI.
Fideliz AI Base Model
The internally developed base model on which Fidel Law 1 was developed.
Legal Retrieval
Identifying relevant legal provisions from a natural-language query.
Case-to-Article Mapping
Mapping a described legal situation to a relevant legal article.
Bidirectional Mapping
Mapping an article to a legal concept and a legal concept back to its article.
Causal Language Model
A language model that predicts subsequent tokens based on previous tokens.
Custom Tokenizer
A tokenizer developed for the Amharic/Ge'ez language domain.
Fidel Law 1 is part of Fideliz AI's broader effort to develop reasoning-focused AI and foundation models from the ground up in Ethiopia.
The company's work as building foundation AI models from zero, with research spanning mathematics, biology, law, finance, and Ethiopian applications.
Fideliz AI is also actively developing Ethiopian training data, evaluation processes, and locally relevant AI systems.
Fideliz AI:
https://www.linkedin.com/company/fideliz-ai
Model Card Authors
Yisak Bule
AI Team Lead, Fideliz AI
Fideliz AI 🇪🇹
For research collaboration, technical questions, or feedback, please contact the Fideliz AI team through the project repository or company page.
License
Fidel Law 1 is released under the Apache License 2.0.
See the repository license for the complete terms.