Instructions to use alfredplpl/suzume-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alfredplpl/suzume-poc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alfredplpl/suzume-poc")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alfredplpl/suzume-poc") model = AutoModelForCausalLM.from_pretrained("alfredplpl/suzume-poc") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use alfredplpl/suzume-poc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alfredplpl/suzume-poc" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alfredplpl/suzume-poc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/alfredplpl/suzume-poc
- SGLang
How to use alfredplpl/suzume-poc 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 "alfredplpl/suzume-poc" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alfredplpl/suzume-poc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "alfredplpl/suzume-poc" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alfredplpl/suzume-poc", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use alfredplpl/suzume-poc with Docker Model Runner:
docker model run hf.co/alfredplpl/suzume-poc
はじめに
GoogleのGemma-2Bを日本語で使えるように継続事前学習を施した、商用利用可能なベースモデルです。 小型なのでスマホや家電などに向いています。ただし、Instruction tuningが困難な可能性があります。
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("alfredplpl/suzume-poc")
model = AutoModelForCausalLM.from_pretrained("alfredplpl/suzume-poc")
input_text = """人工知能とは"""
input_ids = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**input_ids,max_new_tokens=64)
print(tokenizer.decode(outputs[0]))
Result
<bos>人工知能とは、「人工生物」に基づいた知能、意図、計画、感情などの概念を構築し、人間のような思考・意思・判断・判断などを備えた機体とする試み。
本稿では、人工知能やAIに関する動向をまとめる。なお、「人工知能」と
Base model
- google/gemma-2b
Dataset for continual pretraining
- izumi-lab/wikipedia-ja-20230720
How to make this model
- Downloads last month
- 6
