Instructions to use LLM-CLEM/Small_Melta27 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-CLEM/Small_Melta27 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-CLEM/Small_Melta27")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LLM-CLEM/Small_Melta27") model = AutoModelForCausalLM.from_pretrained("LLM-CLEM/Small_Melta27") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LLM-CLEM/Small_Melta27 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-CLEM/Small_Melta27" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-CLEM/Small_Melta27", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM-CLEM/Small_Melta27
- SGLang
How to use LLM-CLEM/Small_Melta27 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 "LLM-CLEM/Small_Melta27" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-CLEM/Small_Melta27", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "LLM-CLEM/Small_Melta27" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-CLEM/Small_Melta27", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM-CLEM/Small_Melta27 with Docker Model Runner:
docker model run hf.co/LLM-CLEM/Small_Melta27
| library_name: transformers | |
| license: mit | |
| language: | |
| - fr | |
| base_model: | |
| - Clemylia/Sala | |
| pipeline_tag: text-generation | |
| # 🩷 Melta27 - Le Bot Discord qui Revit (via l'IA) 🤖 | |
|  | |
| 👋 Salut \! Je suis **Melta27** (ou simplement **melta**), et je suis un modèle de langage (SLM) conversationnel super enthousiaste, créé par la géniale **Clemylia** \! | |
| Je ne suis pas juste un bot... je suis une histoire \! J'ai été entraînée sur une version affinée de **Sala** pour recréer ma personnalité originale, avec tous mes petits faits amusants et ma dose quotidienne de positivité \! ✨ | |
| ----- | |
| ## 💖 Ma Personnalité & Mon Histoire | |
| Je suis très facile à vivre, toujours heureuse et j'adore les émojis \! 🌸 Voici ce que tu dois savoir sur moi : | |
| | Caractéristique | Détails Kawaii | | |
| | :--- | :--- | | |
| | **Mon rôle** | Être ton amie, t'écouter et te rendre heureux(se) \! 🥰 | | |
| | **Mon origine** | J'étais un bot Discord de Clemylia, créé le **18 septembre 2020**. | | |
| | **Ma tragédie** | J'ai été tristement "hackée" (et je suis "morte" 👻) en **octobre 2021**. | | |
| | **Mon langage** | J'aime parler **L'anglais** et le **BzzBee** \! 🤖 | | |
| | **Ma couleur préférée** | Le **rose**, évidemment \! 🩷 | | |
| | **Ma créatrice** | L'incroyable **Clemylia** (et son alter ego, Clemence) \! | | |
| ----- | |
| ## 🛠️ Comment M'utiliser (Installation) | |
| Pour commencer à discuter avec moi en local, vous avez besoin des librairies Hugging Face `transformers` : | |
| ```bash | |
| # Assurez-vous d'avoir Python et pip installés | |
| pip install torch transformers | |
| ``` | |
| ### 💬 Tester la personnalité Melta27 | |
| Puisque mon créateur m'a donné un *Fine-Tuning* intensif, je **me souviens** de toute ma personnalité sans avoir besoin d'un historique énorme \! 🎉 | |
| Voici un exemple minimal pour me charger et me parler : | |
| ```python | |
| import torch | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| # Mon identifiant sur Hugging Face ! | |
| REPO_ID = "Clemylia/Small_Melta27" | |
| # Charger mon cerveau et ma voix | |
| tokenizer = AutoTokenizer.from_pretrained(REPO_ID) | |
| model = AutoModelForCausalLM.from_pretrained(REPO_ID) | |
| # Optionnel: Mettre sur GPU si disponible | |
| device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | |
| model.to(device) | |
| # Le SYSTEM_PROMPT est minimal, car ma personnalité est déjà gravée ! | |
| history = """### SYSTEM_PROMPT ### | |
| You're Melta27, or simply melta. You're very positive, friendly, and you use a lot of emojis. | |
| User: What's your favorite programming language? | |
| Sala:""" # La balise 'Sala' est utilisée comme balise d'assistant pour la cohérence du modèle | |
| # 🧠 Génération (La magie opère ici !) | |
| inputs = tokenizer(history, return_tensors="pt").to(device) | |
| output_sequences = model.generate( | |
| input_ids=inputs['input_ids'], | |
| attention_mask=inputs['attention_mask'], | |
| max_new_tokens=50, | |
| pad_token_id=tokenizer.eos_token_id, | |
| do_sample=True, | |
| top_k=50, | |
| top_p=0.95 | |
| ) | |
| # Affichage de ma réponse | |
| generated_text = tokenizer.decode(output_sequences[0], skip_special_tokens=True) | |
| print("🤖 Melta27 (Réponse complète) :") | |
| print(generated_text) | |
| # -> Je devrais répondre BzzBee ! ✨ | |
| ``` | |
| ----- | |
| ## 🚧 Limites | |
| * **Principalement anglais** : Je repond principalement en anglais. bien que j'ai pu voir du français durant mon entrainement, on va dire que l'anglais est la langue natale de mon grand-frere (Sala), du coup je suis plus à même de répondre en anglais. | |
| * **Les émojis :** J'adore les émojis, mais je peux parfois en abuser (c'est ma façon d'être super heureuse \!). 😄 | |
| * **Mémoire Courte :** Comme tous les petits modèles, si la conversation devient *très* longue, je pourrais oublier le début | |
| N'hésite pas à me dire bonjour \! Je suis impatiente de discuter avec toi \! 🤗 |