Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use davanstrien/Smol-Hub-tldr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davanstrien/Smol-Hub-tldr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="davanstrien/Smol-Hub-tldr") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("davanstrien/Smol-Hub-tldr") model = AutoModelForCausalLM.from_pretrained("davanstrien/Smol-Hub-tldr", device_map="auto") 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 Settings
- vLLM
How to use davanstrien/Smol-Hub-tldr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davanstrien/Smol-Hub-tldr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davanstrien/Smol-Hub-tldr", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davanstrien/Smol-Hub-tldr
- SGLang
How to use davanstrien/Smol-Hub-tldr 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 "davanstrien/Smol-Hub-tldr" \ --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": "davanstrien/Smol-Hub-tldr", "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 "davanstrien/Smol-Hub-tldr" \ --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": "davanstrien/Smol-Hub-tldr", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use davanstrien/Smol-Hub-tldr with Docker Model Runner:
docker model run hf.co/davanstrien/Smol-Hub-tldr
Update README.md
Browse files
README.md
CHANGED
|
@@ -42,9 +42,11 @@ The model was trained on:
|
|
| 42 |
- Model card summaries generated by Llama 3.3 70B
|
| 43 |
- Dataset card summaries generated by Llama 3.3 70B
|
| 44 |
|
|
|
|
|
|
|
| 45 |
## Usage
|
| 46 |
|
| 47 |
-
Using the chat template when using the model in inference is recommended. Additionally, you should prepend either `<MODEL_CARD>` or `<DATASET_CARD>` to the start of the card you want to summarize. The training data used the body of the model or dataset card
|
| 48 |
|
| 49 |
I have so far found that a low temperature of `0.4` generates better results.
|
| 50 |
|
|
|
|
| 42 |
- Model card summaries generated by Llama 3.3 70B
|
| 43 |
- Dataset card summaries generated by Llama 3.3 70B
|
| 44 |
|
| 45 |
+
Model context length: the model was trained with cards up to a length of 2048 tokens
|
| 46 |
+
|
| 47 |
## Usage
|
| 48 |
|
| 49 |
+
Using the chat template when using the model in inference is recommended. Additionally, you should prepend either `<MODEL_CARD>` or `<DATASET_CARD>` to the start of the card you want to summarize. The training data used the body of the model or dataset card (i.e., the part after the YAML, so you will likely get better results only by passing this part of the card.
|
| 50 |
|
| 51 |
I have so far found that a low temperature of `0.4` generates better results.
|
| 52 |
|