Text Generation
Transformers
PyTorch
llama
trl
sft
Generated from Trainer
conversational
text-generation-inference
Instructions to use anudaw/full_finetuned-code-tinyllama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anudaw/full_finetuned-code-tinyllama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anudaw/full_finetuned-code-tinyllama") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anudaw/full_finetuned-code-tinyllama") model = AutoModelForCausalLM.from_pretrained("anudaw/full_finetuned-code-tinyllama") 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 anudaw/full_finetuned-code-tinyllama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anudaw/full_finetuned-code-tinyllama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anudaw/full_finetuned-code-tinyllama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anudaw/full_finetuned-code-tinyllama
- SGLang
How to use anudaw/full_finetuned-code-tinyllama 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 "anudaw/full_finetuned-code-tinyllama" \ --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": "anudaw/full_finetuned-code-tinyllama", "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 "anudaw/full_finetuned-code-tinyllama" \ --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": "anudaw/full_finetuned-code-tinyllama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use anudaw/full_finetuned-code-tinyllama with Docker Model Runner:
docker model run hf.co/anudaw/full_finetuned-code-tinyllama
update model card README.md
Browse files
README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 4 |
tags:
|
|
|
|
|
|
|
| 5 |
- generated_from_trainer
|
|
|
|
|
|
|
| 6 |
model-index:
|
| 7 |
- name: full_finetuned-code-tinyllama
|
| 8 |
results: []
|
|
@@ -13,7 +17,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 13 |
|
| 14 |
# full_finetuned-code-tinyllama
|
| 15 |
|
| 16 |
-
This model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) on
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
@@ -41,6 +45,10 @@ The following hyperparameters were used during training:
|
|
| 41 |
- lr_scheduler_warmup_ratio: 0.03
|
| 42 |
- num_epochs: 4
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
### Framework versions
|
| 45 |
|
| 46 |
- Transformers 4.31.0
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 4 |
tags:
|
| 5 |
+
- trl
|
| 6 |
+
- sft
|
| 7 |
- generated_from_trainer
|
| 8 |
+
datasets:
|
| 9 |
+
- generator
|
| 10 |
model-index:
|
| 11 |
- name: full_finetuned-code-tinyllama
|
| 12 |
results: []
|
|
|
|
| 17 |
|
| 18 |
# full_finetuned-code-tinyllama
|
| 19 |
|
| 20 |
+
This model is a fine-tuned version of [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) on the generator dataset.
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
|
|
| 45 |
- lr_scheduler_warmup_ratio: 0.03
|
| 46 |
- num_epochs: 4
|
| 47 |
|
| 48 |
+
### Training results
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
### Framework versions
|
| 53 |
|
| 54 |
- Transformers 4.31.0
|