Text Generation
Transformers
PyTorch
Safetensors
English
Chinese
llama
conversational
text-generation-inference
Instructions to use GeneZC/MiniChat-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GeneZC/MiniChat-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GeneZC/MiniChat-3B") 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("GeneZC/MiniChat-3B") model = AutoModelForCausalLM.from_pretrained("GeneZC/MiniChat-3B", 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 GeneZC/MiniChat-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GeneZC/MiniChat-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GeneZC/MiniChat-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GeneZC/MiniChat-3B
- SGLang
How to use GeneZC/MiniChat-3B 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 "GeneZC/MiniChat-3B" \ --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": "GeneZC/MiniChat-3B", "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 "GeneZC/MiniChat-3B" \ --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": "GeneZC/MiniChat-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GeneZC/MiniChat-3B with Docker Model Runner:
docker model run hf.co/GeneZC/MiniChat-3B
Commit History
-
Update tokenizer_config.json
Verified signature5b91092
-
Update README.md
6d5b150 -
Update README.md
9aa22ea -
Update README.md (#4)
- Update README.md (576552f9efceeaeaa92e904d1e60562812d0c4a6) Co-authored-by: shakhal levinson <shakhal@users.noreply.huggingface.co>dcd5708
-
Adding `safetensors` variant of this model (#1)
- Adding `safetensors` variant of this model (4861346c7addd3d15a8d4d184a4789bf739d6346) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>3cf2a82 -
Adding Evaluation Results (#2)
- Adding Evaluation Results (7109a5fb1fda92a969db76d82e632e85149c0b08) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>7aff1de
-
Update README.md
123d23b
-
Update README.md
f4d51bd -
Update README.md
218fd5f -
Update README.md
1363d26 -
Upload 5 files
22107f9 -
Update README.md
e216587 -
Update README.md
c06e50f -
Update README.md
57e01c7 -
Update README.md
f45c67c
-
Update README.md
e5bd397 -
Upload 2 files
865d789 -
Update README.md
b231352 -
initial commit
a2196dd