| # tinyllama-1.1b |
|
|
| ## Overview |
| `tinyllama-1.1b` is a compact and efficient transformer-based model designed for high-performance language tasks. It is optimized for resource-constrained environments while maintaining robust accuracy across a variety of natural language processing benchmarks. |
|
|
| ### Features |
| - **Size**: 1.1 billion parameters |
| - **Efficiency**: Designed for low-latency inference |
| - **Compatibility**: Easily extendable with techniques like LoRA for fine-tuning |
|
|
| ### Usage |
| To load and use the base model, you can use the following code snippet: |
|
|
| ```python |
| from transformers import AutoModelForCausalLM, AutoTokenizer |
| |
| # Load the base model |
| base_model_path = "path/to/tinyllama-1.1b" |
| model = AutoModelForCausalLM.from_pretrained(base_model_path) |
| tokenizer = AutoTokenizer.from_pretrained(base_model_path) |
| |
| # Example usage |
| inputs = tokenizer("Hello, world!", return_tensors="pt") |
| outputs = model.generate(inputs["input_ids"]) |
| print(tokenizer.decode(outputs[0])) |
| |