Text Generation
Transformers
PyTorch
English
gpt_neox
gpt
llm
large language model
h2o-llmstudio
text-generation-inference
Instructions to use BernardOng/Banking-FT-Bong-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BernardOng/Banking-FT-Bong-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BernardOng/Banking-FT-Bong-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BernardOng/Banking-FT-Bong-v1") model = AutoModelForCausalLM.from_pretrained("BernardOng/Banking-FT-Bong-v1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BernardOng/Banking-FT-Bong-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BernardOng/Banking-FT-Bong-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BernardOng/Banking-FT-Bong-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BernardOng/Banking-FT-Bong-v1
- SGLang
How to use BernardOng/Banking-FT-Bong-v1 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 "BernardOng/Banking-FT-Bong-v1" \ --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": "BernardOng/Banking-FT-Bong-v1", "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 "BernardOng/Banking-FT-Bong-v1" \ --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": "BernardOng/Banking-FT-Bong-v1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BernardOng/Banking-FT-Bong-v1 with Docker Model Runner:
docker model run hf.co/BernardOng/Banking-FT-Bong-v1
| architecture: | |
| backbone_dtype: float16 | |
| force_embedding_gradients: false | |
| gradient_checkpointing: false | |
| intermediate_dropout: 0.0 | |
| pretrained: true | |
| pretrained_weights: '' | |
| augmentation: | |
| random_parent_probability: 0.0 | |
| skip_parent_probability: 0.0 | |
| token_mask_probability: 0.0 | |
| dataset: | |
| add_eos_token_to_answer: true | |
| add_eos_token_to_prompt: true | |
| answer_column: "Answer\r" | |
| data_sample: 1.0 | |
| data_sample_choice: | |
| - Train | |
| - Validation | |
| mask_prompt_labels: true | |
| parent_id_column: None | |
| prompt_column: | |
| - Question | |
| text_answer_separator: <|answer|> | |
| text_prompt_start: <|prompt|> | |
| train_dataframe: data/user/Bank-QnA-Repeat/Bank-QnA-Repeat.csv | |
| validation_dataframe: None | |
| validation_size: 0.01 | |
| validation_strategy: automatic | |
| environment: | |
| compile_model: false | |
| find_unused_parameters: false | |
| gpus: | |
| - '0' | |
| mixed_precision: true | |
| number_of_workers: 8 | |
| seed: -1 | |
| trust_remote_code: false | |
| use_fsdp: false | |
| experiment_name: Banking-Chatbot-v1 | |
| llm_backbone: h2oai/h2ogpt-oig-oasst1-512-6.9b | |
| logging: | |
| logger: None | |
| neptune_project: '' | |
| number_of_texts: 10 | |
| output_directory: output/user/Banking-Chatbot-v1/ | |
| prediction: | |
| batch_size_inference: 0 | |
| do_sample: false | |
| max_length_inference: 256 | |
| metric: BLEU | |
| min_length_inference: 2 | |
| num_beams: 2 | |
| num_history: 2 | |
| repetition_penalty: 1.2 | |
| stop_tokens: '' | |
| temperature: 8.0 | |
| top_k: 0 | |
| top_p: 1.0 | |
| problem_type: text_causal_language_modeling | |
| tokenizer: | |
| add_prefix_space: false | |
| add_prompt_answer_tokens: false | |
| max_length: 512 | |
| max_length_answer: 256 | |
| max_length_prompt: 256 | |
| padding_quantile: 1.0 | |
| use_fast: true | |
| training: | |
| batch_size: 3 | |
| differential_learning_rate: 1.0e-05 | |
| differential_learning_rate_layers: [] | |
| drop_last_batch: true | |
| epochs: 3 | |
| evaluate_before_training: true | |
| evaluation_epochs: 1.0 | |
| grad_accumulation: 1 | |
| gradient_clip: 0.0 | |
| learning_rate: 0.0001 | |
| lora: true | |
| lora_alpha: 16 | |
| lora_dropout: 0.05 | |
| lora_r: 4 | |
| lora_target_modules: '' | |
| loss_function: CrossEntropy | |
| optimizer: AdamW | |
| save_best_checkpoint: false | |
| schedule: Cosine | |
| train_validation_data: true | |
| warmup_epochs: 0.05 | |
| weight_decay: 0.0 | |