Instructions to use Luke-griggs/small-talk-1.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Luke-griggs/small-talk-1.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Luke-griggs/small-talk-1.3") 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("Luke-griggs/small-talk-1.3") model = AutoModelForCausalLM.from_pretrained("Luke-griggs/small-talk-1.3", 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 Luke-griggs/small-talk-1.3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Luke-griggs/small-talk-1.3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Luke-griggs/small-talk-1.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Luke-griggs/small-talk-1.3
- SGLang
How to use Luke-griggs/small-talk-1.3 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 "Luke-griggs/small-talk-1.3" \ --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": "Luke-griggs/small-talk-1.3", "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 "Luke-griggs/small-talk-1.3" \ --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": "Luke-griggs/small-talk-1.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Luke-griggs/small-talk-1.3 with Docker Model Runner:
docker model run hf.co/Luke-griggs/small-talk-1.3
Model Card for small-talk-1.3
Model Details
This model was trained on HumanLLMs/Human-Like-DPO-Dataset
Model Description
small talk 1.3 was designed to provide human-like responses to queries. Instead of replying to personal questions with responses like "I am just a freindly assistant..." or " As an AI model, I can't...," the model will engage in the dialogue and provide meaningful responses - similar to that of a human.
- Developed by: Luke Griggs
- License: MIT
- Finetuned from model: meta-llama/Llama-3.2-1B-Instruct
How to Get Started with the Model
Install dependencies
!pip -q install transformers accelerate safetensors bitsAndBytes
Load the model and tokenizer
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
repo = "Luke-griggs/small-talk-1.3"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16, # or float16 if needed
)
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo,
torch_dtype=torch.float16,
device_map="auto"
)
model.eval()
Generate a response
chat = [
{"role": "system",
"content": """
You are a helpful, polite, and friendly assistant. Answer questions to the best of your ability.
If you don't know something, be honest and say so. Keep responses clear and concise."},
"""},
{"role": "user", "content": "What's your favorite thing to do?"}
]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.7,
top_p=0.9
)
full_text = tokenizer.decode(output[0], skip_special_tokens=True)
prompt_text = tokenizer.decode(inputs['input_ids'][0], skip_special_tokens=True)
print(full_text[len(prompt_text):])
Training Details
Training Data
https://huggingface.co/datasets/HumanLLMs/Human-Like-DPO-Dataset
Training Procedure
This model was trained using DPO.
Compute Infrastructure
One RTX-4090
Model Card Authors
- Downloads last month
- 13