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
Commit ·
3f8e529
1
Parent(s): bc22c13
Upload LlamaForCausalLM
Browse files- config.json +13 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -11,12 +11,24 @@
|
|
| 11 |
"hidden_size": 2048,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
"intermediate_size": 5632,
|
| 14 |
-
"max_position_embeddings":
|
| 15 |
"model_type": "llama",
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
"num_hidden_layers": 22,
|
| 18 |
"num_key_value_heads": 4,
|
| 19 |
"pretraining_tp": 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
"rope_theta": 10000.0,
|
|
|
|
| 11 |
"hidden_size": 2048,
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
"intermediate_size": 5632,
|
| 14 |
+
"max_position_embeddings": 2048,
|
| 15 |
"model_type": "llama",
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
"num_hidden_layers": 22,
|
| 18 |
"num_key_value_heads": 4,
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
+
"quantization_config": {
|
| 21 |
+
"bnb_4bit_compute_dtype": "float16",
|
| 22 |
+
"bnb_4bit_quant_type": "nf4",
|
| 23 |
+
"bnb_4bit_use_double_quant": true,
|
| 24 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 25 |
+
"llm_int8_has_fp16_weight": false,
|
| 26 |
+
"llm_int8_skip_modules": null,
|
| 27 |
+
"llm_int8_threshold": 6.0,
|
| 28 |
+
"load_in_4bit": true,
|
| 29 |
+
"load_in_8bit": false,
|
| 30 |
+
"quant_method": "bitsandbytes"
|
| 31 |
+
},
|
| 32 |
"rms_norm_eps": 1e-05,
|
| 33 |
"rope_scaling": null,
|
| 34 |
"rope_theta": 10000.0,
|
generation_config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 1,
|
| 3 |
"eos_token_id": 2,
|
| 4 |
-
"max_length":
|
| 5 |
"pad_token_id": 0,
|
| 6 |
"transformers_version": "4.36.2"
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"bos_token_id": 1,
|
| 3 |
"eos_token_id": 2,
|
| 4 |
+
"max_length": 2048,
|
| 5 |
"pad_token_id": 0,
|
| 6 |
"transformers_version": "4.36.2"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4400216536
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81d8a3e955b93452c7b0ad3eeddb7074dcf4faf2970ecd4a04461bcad69f6ade
|
| 3 |
size 4400216536
|