Instructions to use HuggingFaceH4/tiny-random-LlamaForSequenceClassification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceH4/tiny-random-LlamaForSequenceClassification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="HuggingFaceH4/tiny-random-LlamaForSequenceClassification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/tiny-random-LlamaForSequenceClassification") model = AutoModelForSequenceClassification.from_pretrained("HuggingFaceH4/tiny-random-LlamaForSequenceClassification") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "HuggingFaceH4/tiny-random-LlamaForCausalLM", | |
| "architectures": [ | |
| "LlamaForSequenceClassification" | |
| ], | |
| "bos_token_id": 0, | |
| "eos_token_id": 1, | |
| "hidden_act": "silu", | |
| "hidden_size": 16, | |
| "id2label": { | |
| "0": "LABEL_0" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 64, | |
| "label2id": { | |
| "LABEL_0": 0 | |
| }, | |
| "max_position_embeddings": 2048, | |
| "model_type": "llama", | |
| "num_attention_heads": 4, | |
| "num_hidden_layers": 2, | |
| "pad_token_id": -1, | |
| "rms_norm_eps": 1e-06, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.28.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 32000 | |
| } | |