Instructions to use redhamohamed/Mimo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use redhamohamed/Mimo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("openai-community/gpt2", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("redhamohamed/Mimo") prompt = "prompt = \"\"\" Créer un script Python pour renommer tous les fichiers .txt en majuscules dans /Documents. Le script doit être sûr, efficace et lisible. \"\"\"" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
| tags: | |
| - text-to-image | |
| - lora | |
| - diffusers | |
| - template:diffusion-lora | |
| widget: | |
| - output: | |
| url: images/Mimo.png | |
| text: >- | |
| prompt = """ Créer un script Python pour renommer tous les fichiers .txt en | |
| majuscules dans /Documents. Le script doit être sûr, efficace et lisible. | |
| """ | |
| parameters: | |
| negative_prompt: >- | |
| negative_prompt = """ Ne jamais supprimer des fichiers ou dossiers, Ne pas | |
| exécuter de commandes dangereuses, Ne pas modifier les fichiers système. | |
| """ | |
| base_model: openai-community/gpt2 | |
| instance_prompt: Mimo, Assistant, AI, Code, Automatisation, Agent | |
| license: apache-2.0 | |
| # Mimo | |
| <Gallery /> | |
| ## Model description | |
| # 🤖 Mimo – Instruction-Following AI Model (3B) | |
| **Créateur :** ABDESSEMED Mohamed Redha | |
| **Contact :** [mohamed.abdessemed@eurocybersecurite.fr](mailto:mohamed.abdessemed@eurocybersecurite.fr) | |
| **Poids final :** ~776 MB (GGUF quantisé) | |
| **Paramètres :** ~3B (approx.) | |
| **License :** Apache 2.0 | |
| --- | |
| ## 📝 Description | |
| **Mimo** est un modèle de langage **fine-tuné** pour le *suivi d’instructions* (**instruction-following**), basé sur une architecture GPT. | |
| Contrairement aux modèles généralistes, **Mimo est entraîné pour exécuter des consignes complexes avec précision** en français et en anglais. | |
| Il combine **polyvalence** (conversation, code, agents) et **légèreté** (fonctionne localement sans cloud). | |
| --- | |
| ## 📚 Datasets utilisés | |
| Le fine-tuning de Mimo repose sur un mélange de plusieurs sources : | |
| 1. **Dataset 1** : Instructions et dialogues structurés (*style Alpaca, Dolly, etc.*) | |
| 2. **Dataset 2** : Corpus conversationnel multi-domaines | |
| 3. **Dataset 3** : Données orientées **programmation, scripting et agents IA** | |
| *(Détails volontairement gardés génériques pour confidentialité.)* | |
| --- | |
| ## ⚙️ Capacités principales | |
| * **💬 Conversation** : réponses fluides et contextuelles, bilingue (FR/EN) | |
| * **💻 Génération de code** : Python, JavaScript, C, SQL, Shell, etc. | |
| * **🛠️ Automatisation** : génération de scripts pour automatiser des tâches système et cloud | |
| * **🤖 Agents IA** : capable de simuler un *workflow agent* pour orchestrer des outils ou APIs | |
| * **🔒 Local-first** : fonctionne entièrement hors ligne sur Mac/PC (via Ollama, LM Studio, llama.cpp, MLX) | |
| --- | |
| ## 📦 Formats disponibles | |
| * **Hugging Face (HF)** : modèle fusionné (`safetensors`) | |
| * **GGUF** : compatible **llama.cpp**, **Ollama**, **LM Studio** | |
| * **MLX** : optimisé pour **Apple Silicon (Mac M1/M2/M3)** | |
| --- | |
| ## 🚀 Exemple d’utilisation | |
| ### 1. Avec Transformers (HF) | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| tokenizer = AutoTokenizer.from_pretrained("abdessemed/mimo") | |
| model = AutoModelForCausalLM.from_pretrained("abdessemed/mimo") | |
| prompt = "Écris un script Python qui trie une liste de nombres aléatoires." | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_new_tokens=150) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| --- | |
| ### 2. Avec Ollama (local Mac/PC) | |
| ```bash | |
| ollama create mimo -f Mimoq8.gguf | |
| ollama run mimo | |
| ``` | |
| --- | |
| ### 3. Automatisation de tâches | |
| ```text | |
| User: Génère un script Bash pour sauvegarder mon dossier ~/Documents dans ~/Backup | |
| Mimo: | |
| #!/bin/bash | |
| mkdir -p ~/Backup | |
| cp -r ~/Documents/* ~/Backup/ | |
| echo "Sauvegarde terminée." | |
| ``` | |
| --- | |
| ### 4. Agent IA simplifié | |
| ```text | |
| User: Surveille un dossier et envoie-moi un email si un nouveau fichier apparaît. | |
| Mimo: [Propose un script Python utilisant watchdog + SMTP] | |
| ``` | |
| --- | |
| ## 📊 Graphique illustratif | |
| ```text | |
| +--------------------+ | |
| | User Instruction | | |
| +--------------------+ | |
| ↓ | |
| [ Tokenizer & Embeddings ] | |
| ↓ | |
| [ Mimo 3B ] | |
| (Fine-tuned GPT core) | |
| ↓ | |
| [ Response Generator ] | |
| ↓ | |
| +--------------------+ | |
| | Smart Answer/Code | | |
| +--------------------+ | |
| ``` | |
| --- | |
| ## 📌 Notes | |
| * Développé et optimisé par **ABDESSEMED Mohamed Redha** | |
| * Licence ouverte **Apache 2.0** (usage personnel, recherche, commercial autorisé) | |
| * Compact mais puissant : **~3B paramètres, 776 MB quantisé** | |
| * Idéal pour **code + conversation + automatisation + agents** | |
| * Fonctionne **offline**, optimisé pour **Mac (Apple Silicon)** mais portable sur Linux & Windows | |
| --- | |
| ## Trigger words | |
| You should use `Mimo` to trigger the image generation. | |
| You should use `Assistant` to trigger the image generation. | |
| You should use `AI` to trigger the image generation. | |
| You should use `Code` to trigger the image generation. | |
| You should use `Automatisation` to trigger the image generation. | |
| You should use `Agent` to trigger the image generation. | |
| ## Download model | |
| [Download](/redhamohamed/Mimo/tree/main) them in the Files & versions tab. | |