Text Generation
Transformers
Safetensors
French
gpt2
causal-lm
french
literary
from-scratch
text-generation-inference
Instructions to use Mathieu680/Rastignac-1.0-126M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mathieu680/Rastignac-1.0-126M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mathieu680/Rastignac-1.0-126M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Mathieu680/Rastignac-1.0-126M") model = AutoModelForCausalLM.from_pretrained("Mathieu680/Rastignac-1.0-126M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mathieu680/Rastignac-1.0-126M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mathieu680/Rastignac-1.0-126M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mathieu680/Rastignac-1.0-126M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mathieu680/Rastignac-1.0-126M
- SGLang
How to use Mathieu680/Rastignac-1.0-126M 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 "Mathieu680/Rastignac-1.0-126M" \ --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": "Mathieu680/Rastignac-1.0-126M", "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 "Mathieu680/Rastignac-1.0-126M" \ --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": "Mathieu680/Rastignac-1.0-126M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Mathieu680/Rastignac-1.0-126M with Docker Model Runner:
docker model run hf.co/Mathieu680/Rastignac-1.0-126M
Commit History
-
Ajoute le lien vers la version GGUF
Verified signature49a76e8 -
Simplifie la duree dentrainement dans la documentation
Verified signature6b7ae7d -
Documente le materiel et la duree de l entrainement
Verified signatureb67798a -
Ameliore le model card avec des exemples de generation
Verified signature711e863 -
Ajoute le schéma d architecture et l âge moyen du corpus
Verified signature64d130a -
Réécrit la fiche modèle Rastignac 1.0
Verified signatureadfc2b8 -
Précise la description de la littérature française
Verified signatureeae0b7b -
Met à jour la description du corpus et les métadonnées
Verified signature0fc415c -
Corrige le nom du modèle dans la fiche
Verified signaturee3776e4 -
Upload initial de Rastignac 126M
Verified signatureae34f60 -
initial commit
Verified signature933094c