Text Generation
Transformers
Safetensors
PyTorch
qwen2
chat
code
math
Merge
conversational
text-generation-inference
Instructions to use Simonc-44/Cygnis-A3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Simonc-44/Cygnis-A3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Simonc-44/Cygnis-A3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Simonc-44/Cygnis-A3") model = AutoModelForCausalLM.from_pretrained("Simonc-44/Cygnis-A3", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Simonc-44/Cygnis-A3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Simonc-44/Cygnis-A3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Simonc-44/Cygnis-A3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Simonc-44/Cygnis-A3
- SGLang
How to use Simonc-44/Cygnis-A3 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 "Simonc-44/Cygnis-A3" \ --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": "Simonc-44/Cygnis-A3", "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 "Simonc-44/Cygnis-A3" \ --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": "Simonc-44/Cygnis-A3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Simonc-44/Cygnis-A3 with Docker Model Runner:
docker model run hf.co/Simonc-44/Cygnis-A3
| license: apache-2.0 | |
| language: | |
| - fr | |
| - en | |
| - zh | |
| - es | |
| - de | |
| - ja | |
| - ko | |
| - pt | |
| - it | |
| - ru | |
| tags: | |
| - chat | |
| - code | |
| - math | |
| - merge | |
| - pytorch | |
| base_model: Qwen/Qwen2.5-7B-Instruct | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| <div align="center"> | |
| <picture> | |
| <img src="https://cdn-avatars.huggingface.co/v1/production/uploads/680a73ca52d94f5cba88bb80/86XMG_sTra_Ia_SeWWXGJ.png" alt="Cygnis A3 Logo" width="220" style="border-radius: 50%;"> | |
| </picture> | |
| </div> | |
| <div align="center" style="line-height: 1.5;"> | |
| <a href="https://huggingface.co/Simonc44" target="_blank"> | |
| <img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Simonc44-ffc107?color=ffc107&logoColor=white"/> | |
| </a> | |
| <a href="https://opensource.org/licenses/Apache-2.0" target="_blank"> | |
| <img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/> | |
| </a> | |
| <img alt="Version" src="https://img.shields.io/badge/Version-0.1%20-blueviolet"/> | |
| </div> | |
| --- | |
| ## 1. Présentation | |
| **Cygnis-A3 V0.1** est la première version publique du projet Cygnis A3 — un modèle de 7 milliards de paramètres obtenu par merge linéaire pondéré en PyTorch pur sur la base Qwen2.5. | |
| Cette version **V0.1** est volontairement légère et conservatrice : elle combine uniquement les capacités de code, de mathématiques et de suivi d'instructions, sans module de raisonnement DeepSeek-R1 (prévu en V0.2). Elle sert de base validée et stable pour les itérations suivantes. | |
| > **Différence V0.1 vs V0.2 :** La V0.1 ne contient pas de raisonnement Chain-of-Thought (`<think>`) ni de balises de réflexion interne. Les réponses sont directes et sans étape de réflexion explicite. La V0.2 intégrera DeepSeek-R1-Distill-Qwen-7B via SLERP pour ajouter ce moteur de raisonnement. | |
| --- | |
| ## 2. Résumé du modèle | |
| <div align="center"> | |
| <table> | |
| <tbody> | |
| <tr> | |
| <td><strong>Architecture</strong></td> | |
| <td>Merge linéaire PyTorch pur (LM Causal Dense)</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Paramètres</strong></td> | |
| <td>7,6B</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Modèle de base</strong></td> | |
| <td>Qwen/Qwen2.5-7B-Instruct</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Modèles mergés</strong></td> | |
| <td>Qwen2.5-7B-Instruct × 0.70 + Qwen2.5-Coder-7B × 0.20 + Qwen2.5-Math-7B × 0.10</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Méthode de fusion</strong></td> | |
| <td>Interpolation linéaire pondérée (PyTorch state_dict)</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Embeddings</strong></td> | |
| <td>Protégés — copiés 100% depuis le base model (aucun merge)</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Raisonnement CoT</strong></td> | |
| <td>❌ Non (prévu en V0.2 avec DeepSeek-R1)</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Couches</strong></td> | |
| <td>28</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Contexte natif</strong></td> | |
| <td>32 768 tokens</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Précision</strong></td> | |
| <td>BFloat16</td> | |
| </tr> | |
| <tr> | |
| <td><strong>Modalité</strong></td> | |
| <td>Texte & Code</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| --- | |
| ## 3. Utilisation | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| import torch | |
| model_id = "Simonc44/Cygnis-A3" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| dtype=torch.float16, | |
| device_map="auto", | |
| trust_remote_code=True, | |
| ) | |
| messages = [ | |
| {"role": "user", "content": "Écris une fonction Python qui calcule le PGCD de deux nombres."} | |
| ] | |
| text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| ids = tokenizer(text, return_tensors="pt").to(model.device) | |
| with torch.no_grad(): | |
| out = model.generate( | |
| **ids, | |
| max_new_tokens=300, | |
| do_sample=True, | |
| temperature=0.6, | |
| top_p=0.95, | |
| repetition_penalty=1.05, | |
| eos_token_id=[tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|im_end|>")], | |
| pad_token_id=tokenizer.eos_token_id, | |
| ) | |
| response = tokenizer.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True) | |
| print(response) | |
| ``` | |
| --- | |
| ## 4. Hyperparamètres recommandés | |
| | Paramètre | Valeur recommandée | | |
| |-----------|-------------------| | |
| | Temperature | `0.6` | | |
| | Top-P | `0.95` | | |
| | Repetition Penalty | `1.05` | | |
| | Max New Tokens | `512–1024` | | |
| --- | |
| ## 6. Licence | |
| Distribué sous licence **[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)**. |