Instructions to use 4E-AI/Fidel1.1-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 4E-AI/Fidel1.1-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="4E-AI/Fidel1.1-1B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("4E-AI/Fidel1.1-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 4E-AI/Fidel1.1-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "4E-AI/Fidel1.1-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "4E-AI/Fidel1.1-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/4E-AI/Fidel1.1-1B
- SGLang
How to use 4E-AI/Fidel1.1-1B 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 "4E-AI/Fidel1.1-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "4E-AI/Fidel1.1-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "4E-AI/Fidel1.1-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "4E-AI/Fidel1.1-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 4E-AI/Fidel1.1-1B with Docker Model Runner:
docker model run hf.co/4E-AI/Fidel1.1-1B
Fidel1.1-1B
This repository contains the complete Fidel model weights, tokenizer, and custom model implementation for Hugging Face Transformers. For quantized native CPU inference, see Fidel1.1-1B-GGUF.
Fidel 1.1 is a compact text-generation model from 4E-AI, combining Mamba3 MIMO sequence modeling, attention, and a latent mixture-of-experts architecture. It brings the model's backbone, coding adapters, and conversational components together in one package for local inference and application development.
Fidel is available in a complete FP32 Transformers edition and four GGUF storage variants. The weights and original Fidel code are released under Apache-2.0, allowing developers to use, modify, and redistribute them under the license terms.
Fidel Highlights
- Hybrid architecture: Eight Mamba3 MIMO blocks and one attention block combine state-space sequence modeling with attention.
- Latent mixture of experts: Each block routes tokens to two of sixteen experts in a 512-dimensional latent space, alongside a shared feed-forward path.
- Complete model package: Backbone weights, coding adaptation, prompt conditioning, and chat components are included in one SafeTensors file. No separate adapter download is required.
- Local execution: The Transformers implementation runs through PyTorch on CPU or compatible CUDA devices without installing the training repository or custom CUDA extensions.
- Multiple deployment sizes: The companion GGUF release offers F16, Q8, Q5, and mixed Q4 files with a dedicated Fidel native CPU runtime.
- Open customization: Apache-2.0 permits building applications, modifying the original code, and developing derivative models, subject to its terms.
Model Overview
| Property | Configuration |
|---|---|
| Developer | 4E-AI |
| Model type | Text-only autoregressive language model |
| Architecture | Hybrid Mamba3 MIMO, attention, and latent MoE |
| Model family size | 1B |
| Complete stored floating-point state | Approximately 1.403 billion elements, including floating buffers |
| Hidden dimension | 1,536 |
| Number of backbone layers | 9 |
| Mixer layout | 8 Mamba3 MIMO blocks and 1 attention block |
| Attention position | Eighth block |
| Query / key-value heads | 16 / 4 |
| Attention head dimension | 96 |
| Rotary embedding base | 10,000 |
| Mamba heads / head dimension | 48 / 64 |
| Mamba state dimension / MIMO rank | 64 / 4 |
| Mamba computation chunk length | 16 |
| Experts per MoE layer / selected per token | 16 / 2 |
| Latent expert dimension | 512 |
| Expert intermediate dimension | 2,048 |
| Shared feed-forward intermediate dimension | 6,144 |
| Vocabulary size | 131,072 |
| Embedding and output head | Separate weight matrices |
| Weight format | FP32 SafeTensors |
| License | Apache-2.0 |
The complete package contains approximately 1.403 billion floating-point elements across model weights and buffers, together with Boolean state. 1B is the family designation. MoE selection applies to the routed experts; embeddings, shared paths, and other model components contribute separately to computation.
Fidel Capabilities
Conversational text generation. Fidel accepts chat-formatted text through its included tokenizer template. Developers can build local chat interfaces and experiment with instructions, examples, and conversation history in the prompt.
Code-oriented prompting. Coding adapters are included in the model. Fidel can be prompted with programming questions, source snippets, or code-completion tasks. Execute and test generated code before incorporating it into a project.
Application-specific text workflows. The model can be incorporated into prototypes for drafting, rewriting, summarization, or question answering over supplied text. These are intended application areas to evaluate on your own data, rather than guaranteed performance levels.
Local and offline integration. After downloading the repository and its dependencies, inference can run without a hosted model API. You control the prompts, storage, and application surrounding the model.
Fidel accepts text inputs. Image, audio, video, web browsing, and tool execution require separate application components; they are not provided by this model package.
Local Use and Customization
Choose an execution format
| Edition | Use case | Runtime |
|---|---|---|
| FP32 SafeTensors | Python applications and access to the complete model implementation | Transformers with custom Fidel code |
| F16 GGUF | Native CPU inference with F16 matrix storage | Bundled Fidel runtime |
| Q8 GGUF | Native CPU inference with Q8 matrices and F16 embeddings | Bundled Fidel runtime |
| Q5 GGUF | Smallest validated download in the current GGUF selection | Bundled Fidel runtime |
| Mixed Q4 GGUF | Native CPU inference with Q4 matrices and protected higher-precision tensors | Bundled Fidel runtime |
The Transformers weights occupy approximately 5.61 GB on disk. Inference also needs memory for the framework, activations, and temporary tensors. The GGUF page lists file sizes and native runtime instructions.
Adapt behavior with prompts and context
Start with a clear instruction, the relevant source material, and an example of the desired answer format. For a domain-specific application, retrieve a small set of relevant document passages and include them in the user message. This allows you to experiment with your own knowledge sources without modifying model weights.
For conversation, preserve prior messages in the chat-template input and manage their combined token length. Start with short prompts and modest output limits while testing the application. Review generated answers against the supplied sources and validate structured outputs in application code.
Fine-tune for your coding domain
If you want to specialize Fidel for a particular coding segment, the full model weights provide a starting point for further adaptation. Examples include Python data workflows, JavaScript web development, SQL generation, or the conventions of an internal codebase.
Use carefully prepared examples from your target domain and evaluate the adapted model on representative tasks. A Fidel-compatible fine-tuning workflow is required. For customized GGUF deployment, adapt the full-precision model first, then convert and check the resulting model for local use.
Usage Notes
- Use FP32, one unpadded sequence, and one device for Transformers inference.
- Generation uses full-prefix replay with
use_cache=False. Longer conversations and outputs increase compute cost. - The current adapter enforces an 8,192-token combined input/output limit. This is an implementation limit, not a guarantee of reliable behavior at that length.
- The runtime has been exercised on CPU and NVIDIA T4, A10, and H100. Compatibility with other devices depends on their PyTorch support and needs testing.
- Keep the supplied tokenizer and chat template. Automatic tokenizer-regex changes can alter tokenization.
- Reduced-precision Transformers loading, padded batching, multi-device dispatch, and alternative serving engines are not supported by the included integration.
- Generated answers and code can be incorrect. Check them for the needs of your application.
This edition stores FP32 weights. A packed NVIDIA NVFP4 edition is not included here.
License
Fidel weights and original Fidel code are licensed under Apache-2.0. Commercial use, modification, and redistribution are permitted subject to its terms. Third-party dependencies retain their respective licenses; see NOTICE.
How to use with Transformers
Use Python 3.11 and the tested torch==2.7.0 / transformers==4.57.6 combination. Install a PyTorch build suitable for your CPU or CUDA environment, followed by:
pip install "transformers==4.57.6" safetensors accelerate
The repository contains custom model code. Review it before enabling trust_remote_code=True; for reproducible applications, set revision to the desired repository commit hash in both loading calls.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "4E-AI/Fidel1.1-1B"
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,
trust_remote_code=True,
torch_dtype=torch.float32,
).eval().to(device)
messages = [{"role": "user", "content": "Hello!"}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.inference_mode():
output = model.generate(
**inputs, max_new_tokens=32, do_sample=False, use_cache=False,
)
new_tokens = output[0, inputs.input_ids.shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
For offline use, download the complete repository, then replace repo_id with its local directory. CPU execution uses the same code and is slower. Keep batch size one, avoid padding, retain FP32, and leave caching disabled. Do not use device_map="auto" to split this policy across devices. The GGUF files in the companion repository use a separate native runtime and are not inputs to this Transformers loader.
- Downloads last month
- 305