Instructions to use 1TuanPham/T-Llama-v1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 1TuanPham/T-Llama-v1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="1TuanPham/T-Llama-v1.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("1TuanPham/T-Llama-v1.1") model = AutoModelForCausalLM.from_pretrained("1TuanPham/T-Llama-v1.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 1TuanPham/T-Llama-v1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "1TuanPham/T-Llama-v1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "1TuanPham/T-Llama-v1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/1TuanPham/T-Llama-v1.1
- SGLang
How to use 1TuanPham/T-Llama-v1.1 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 "1TuanPham/T-Llama-v1.1" \ --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": "1TuanPham/T-Llama-v1.1", "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 "1TuanPham/T-Llama-v1.1" \ --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": "1TuanPham/T-Llama-v1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 1TuanPham/T-Llama-v1.1 with Docker Model Runner:
docker model run hf.co/1TuanPham/T-Llama-v1.1
Model Details
Model Description
- Developed by: Tuan Pham (FPTU HCM Student)
- Model type: Llama2-7B Decoder-only
- Finetuned from model :
- meta-llama/Llama-2-7b
- bkai-foundation-models/vietnamese-llama2-7b-120GB
- yeen214/llama2_7b_merge_orcafamily.
- Bilingual support : English and Vietnamese
Model Sources
- Repository:
- Paper: ...
- Demo: ...
Uses
Prompt template
[SYSTEM_PROMPT]
####### Instruction:
[INPUT]
%%%%%%% Response:
[RESPONSE]
How to Get Started with the Model
Use the code below to get started with the model.
from torch.cuda.amp import autocast
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer, pipeline
model_name = "1TuanPham/T-Llama-v1.1"
model = AutoModelForCausalLM.from_pretrained(model_name,
torch_dtype=torch.bfloat16,
use_cache=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
streamer = TextStreamer(tokenizer, skip_special_tokens=True)
pipe = pipeline("text-generation", model=base_model, tokenizer=tokenizer, streamer=streamer)
with autocast():
output_default = pipe("Phạm Nhật Vượng là ", pad_token_id=50256, max_new_tokens=128)
Training Details
Hardware Type:
- GPU: VGA NVIDIA Tesla P100 16GB
- SYSTEM RAM: 29GB
Hours used: ~42.5 Approx*
Training Data
- BactrianX
- OpenOrca_translated
- WizardLM_70k_translated
- TigerLabMathInstruct_translated_vi
- GradeSchoolMathInstruct_translated
- vilm_lima-vi
- MTEngVietnamese
- databricks_dolly15k_translated
- AlpacaCleaned_translated
- databricks_dolly15k
- OpenOrca
- GradeSchoolMathInstruct
- AlpacaCleaned
- WebglmQA
Training Procedure
Learning rate: 2e-5 cosine
Optimizer: PagedLion8bit
QLora: rank: 64 /Q: 4-bit
- 250k examples of 70% Vietnamese 30% English for 3.37 epoch
- 350k examples of 60% Vietnamese 40% English for 1.1 epoch
Training loss
Evaluation
Results
[More Information Needed]
Technical Specifications
Model Architecture and Objective
[More Information Needed]
Citation
Model Card Authors
Model Card Contact
[More Information Needed]
- Downloads last month
- 14
