Text Generation
Transformers
Safetensors
English
talkie
bfloat16
custom_code
conversion
fineweb
modern-data
Instructions to use xlr8harder/talkie-web-13b-base-tf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xlr8harder/talkie-web-13b-base-tf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xlr8harder/talkie-web-13b-base-tf", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("xlr8harder/talkie-web-13b-base-tf", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xlr8harder/talkie-web-13b-base-tf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xlr8harder/talkie-web-13b-base-tf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xlr8harder/talkie-web-13b-base-tf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/xlr8harder/talkie-web-13b-base-tf
- SGLang
How to use xlr8harder/talkie-web-13b-base-tf 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 "xlr8harder/talkie-web-13b-base-tf" \ --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": "xlr8harder/talkie-web-13b-base-tf", "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 "xlr8harder/talkie-web-13b-base-tf" \ --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": "xlr8harder/talkie-web-13b-base-tf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use xlr8harder/talkie-web-13b-base-tf with Docker Model Runner:
docker model run hf.co/xlr8harder/talkie-web-13b-base-tf
File size: 1,413 Bytes
2b33fba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | from __future__ import annotations
from transformers import PretrainedConfig
class TalkieConfig(PretrainedConfig):
model_type = "talkie"
def __init__(
self,
vocab_size: int = 65536,
n_layer: int = 40,
n_head: int = 40,
n_embd: int = 5120,
head_dim: int = 128,
max_position_embeddings: int = 2048,
rope_base: int = 1_000_000,
logit_scale: float = 1.0,
use_cache: bool = True,
tie_word_embeddings: bool = False,
bos_token_id: int | None = None,
eos_token_id: int | list[int] = 65535,
pad_token_id: int | None = None,
**kwargs,
):
super().__init__(
bos_token_id=bos_token_id,
eos_token_id=eos_token_id,
pad_token_id=pad_token_id,
tie_word_embeddings=tie_word_embeddings,
**kwargs,
)
self.vocab_size = vocab_size
self.n_layer = n_layer
self.n_head = n_head
self.n_embd = n_embd
self.head_dim = head_dim
self.max_position_embeddings = max_position_embeddings
self.rope_base = rope_base
self.logit_scale = logit_scale
self.use_cache = use_cache
# Common Transformers aliases used by generation/cache helpers.
self.hidden_size = n_embd
self.num_hidden_layers = n_layer
self.num_attention_heads = n_head
|