Instructions to use LLM360/AmberChat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM360/AmberChat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM360/AmberChat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LLM360/AmberChat") model = AutoModelForCausalLM.from_pretrained("LLM360/AmberChat") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LLM360/AmberChat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM360/AmberChat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM360/AmberChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM360/AmberChat
- SGLang
How to use LLM360/AmberChat 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 "LLM360/AmberChat" \ --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": "LLM360/AmberChat", "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 "LLM360/AmberChat" \ --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": "LLM360/AmberChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM360/AmberChat with Docker Model Runner:
docker model run hf.co/LLM360/AmberChat
Update README.md
Browse files
README.md
CHANGED
|
@@ -35,7 +35,7 @@ from transformers import LlamaTokenizer, LlamaForCausalLM
|
|
| 35 |
tokenizer = LlamaTokenizer.from_pretrained("LLM360/AmberChat")
|
| 36 |
model = LlamaForCausalLM.from_pretrained("LLM360/AmberChat")
|
| 37 |
|
| 38 |
-
input_text = "
|
| 39 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 40 |
|
| 41 |
outputs = model.generate(input_ids)
|
|
@@ -45,11 +45,11 @@ print(tokenizer.decode(outputs[0]))
|
|
| 45 |
# AmberChat Finetuning Details
|
| 46 |
|
| 47 |
## DataMix
|
| 48 |
-
| Subset | Number of rows |
|
| 49 |
-
| ----------- | ----------- |
|
| 50 |
-
| WizardLM/WizardLM_evol_instruct_V2_196k | 143k |
|
| 51 |
-
| icybee/share_gpt_90k_v1 | 90k |
|
| 52 |
-
| Total | 233k |
|
| 53 |
|
| 54 |
## Hyperparameters
|
| 55 |
| Hyperparameter | Value |
|
|
|
|
| 35 |
tokenizer = LlamaTokenizer.from_pretrained("LLM360/AmberChat")
|
| 36 |
model = LlamaForCausalLM.from_pretrained("LLM360/AmberChat")
|
| 37 |
|
| 38 |
+
input_text = "How old are you?"
|
| 39 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
|
| 40 |
|
| 41 |
outputs = model.generate(input_ids)
|
|
|
|
| 45 |
# AmberChat Finetuning Details
|
| 46 |
|
| 47 |
## DataMix
|
| 48 |
+
| Subset | Number of rows | License |
|
| 49 |
+
| ----------- | ----------- | ----------- |
|
| 50 |
+
| WizardLM/WizardLM_evol_instruct_V2_196k | 143k | |
|
| 51 |
+
| icybee/share_gpt_90k_v1 | 90k | cc0-1.0 |
|
| 52 |
+
| Total | 233k | |
|
| 53 |
|
| 54 |
## Hyperparameters
|
| 55 |
| Hyperparameter | Value |
|