Text Generation
Transformers
Safetensors
llama
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use AlignmentLab-AI/teensyorca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlignmentLab-AI/teensyorca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AlignmentLab-AI/teensyorca") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AlignmentLab-AI/teensyorca") model = AutoModelForCausalLM.from_pretrained("AlignmentLab-AI/teensyorca") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AlignmentLab-AI/teensyorca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlignmentLab-AI/teensyorca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlignmentLab-AI/teensyorca", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AlignmentLab-AI/teensyorca
- SGLang
How to use AlignmentLab-AI/teensyorca 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 "AlignmentLab-AI/teensyorca" \ --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": "AlignmentLab-AI/teensyorca", "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 "AlignmentLab-AI/teensyorca" \ --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": "AlignmentLab-AI/teensyorca", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AlignmentLab-AI/teensyorca with Docker Model Runner:
docker model run hf.co/AlignmentLab-AI/teensyorca
Upload 3 files
Browse files- adapter_config.json +28 -0
- adapter_model.bin +3 -0
- tokenizer_config.json +5 -2
adapter_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"fan_in_fan_out": null,
|
| 7 |
+
"inference_mode": true,
|
| 8 |
+
"init_lora_weights": true,
|
| 9 |
+
"layers_pattern": null,
|
| 10 |
+
"layers_to_transform": null,
|
| 11 |
+
"lora_alpha": 16,
|
| 12 |
+
"lora_dropout": 0,
|
| 13 |
+
"modules_to_save": null,
|
| 14 |
+
"peft_type": "LORA",
|
| 15 |
+
"r": 32,
|
| 16 |
+
"rank_pattern": {},
|
| 17 |
+
"revision": null,
|
| 18 |
+
"target_modules": [
|
| 19 |
+
"k_proj",
|
| 20 |
+
"q_proj",
|
| 21 |
+
"v_proj",
|
| 22 |
+
"gate_proj",
|
| 23 |
+
"down_proj",
|
| 24 |
+
"up_proj",
|
| 25 |
+
"o_proj"
|
| 26 |
+
],
|
| 27 |
+
"task_type": "CAUSAL_LM"
|
| 28 |
+
}
|
adapter_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c14a643a80f3033351279cbce28b2e03dff679cd43cb65216a8fa1ff0b4efb3
|
| 3 |
+
size 50569181
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
-
"add_eos_token":
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
@@ -36,7 +36,10 @@
|
|
| 36 |
"pad_token": "</s>",
|
| 37 |
"padding_side": "right",
|
| 38 |
"sp_model_kwargs": {},
|
|
|
|
| 39 |
"tokenizer_class": "LlamaTokenizer",
|
|
|
|
| 40 |
"unk_token": "<unk>",
|
| 41 |
-
"use_default_system_prompt": false
|
|
|
|
| 42 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 36 |
"pad_token": "</s>",
|
| 37 |
"padding_side": "right",
|
| 38 |
"sp_model_kwargs": {},
|
| 39 |
+
"spaces_between_special_tokens": false,
|
| 40 |
"tokenizer_class": "LlamaTokenizer",
|
| 41 |
+
"trust_remote_code": false,
|
| 42 |
"unk_token": "<unk>",
|
| 43 |
+
"use_default_system_prompt": false,
|
| 44 |
+
"use_fast": true
|
| 45 |
}
|