Text Generation
Transformers
Safetensors
English
mistral
text-generation-inference
unsloth
trl
sft
conversational
4-bit precision
bitsandbytes
Instructions to use ChevalierJoseph/typtop4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ChevalierJoseph/typtop4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ChevalierJoseph/typtop4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ChevalierJoseph/typtop4") model = AutoModelForCausalLM.from_pretrained("ChevalierJoseph/typtop4", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ChevalierJoseph/typtop4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ChevalierJoseph/typtop4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ChevalierJoseph/typtop4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ChevalierJoseph/typtop4
- SGLang
How to use ChevalierJoseph/typtop4 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 "ChevalierJoseph/typtop4" \ --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": "ChevalierJoseph/typtop4", "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 "ChevalierJoseph/typtop4" \ --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": "ChevalierJoseph/typtop4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use ChevalierJoseph/typtop4 with Docker Model Runner:
docker model run hf.co/ChevalierJoseph/typtop4
Commit History
-
Update requirements.txt
Verified signatured461939 -
Update handler.py
Verified signature267fefd -
Update handler.py
Verified signatureee72852 -
Update requirements.txt
Verified signature55542d9 -
Update handler.py
Verified signatureb815173 -
Rename handle.py to handler.py
Verified signature8efe53b -
Update handle.py
Verified signaturee8fdd65 -
Update handle.py
Verified signatured93c503 -
Update requirements.txt
Verified signature15b7923 -
Update handle.py
Verified signature66ab117 -
Update requirements.txt
Verified signature802f3f9 -
Rename requirent.txt to requirements.txt
Verified signature481e549 -
Update requirent.txt
Verified signature6c83c10 -
Update handle.py
Verified signaturea77ebfd -
Update handle.py
Verified signature5386581 -
Create requirent.txt
Verified signaturecf57052 -
Update handle.py
Verified signature15363d0 -
Create handle.py
Verified signature096d229
-
Trained with Unsloth
Verified signatureUpload model trained with Unsloth 2x fastere39c5e6 -
Trained with Unsloth
Verified signatureUpload model trained with Unsloth 2x faster457e546 -
Upload README.md with huggingface_hub
Verified signature96421d5 -
initial commit
Verified signature527ceea