Instructions to use Jingya/tiny-random-bert-remote-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jingya/tiny-random-bert-remote-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Jingya/tiny-random-bert-remote-code")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Jingya/tiny-random-bert-remote-code") model = AutoModel.from_pretrained("Jingya/tiny-random-bert-remote-code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| # from transformers import AutoConfig | |
| # from modeling.modeling_bert import BertCustomLMHeadModel | |
| # cfg = AutoConfig.from_pretrained("hf-internal-testing/tiny-random-BertModel") | |
| # BertCustomLMHeadModel.register_for_auto_class("AutoModelForSequenceClassification") | |
| # model = BertCustomLMHeadModel(cfg) | |
| # model.save_pretrained("/home/Jingya/hf_internship/tiny-testing-gpt2-remote-code") |