Text Generation
Transformers
Safetensors
English
qwen2
ai-detection
paraphrasing
originality
privacy
conversational
text-generation-inference
Instructions to use Aman90101/test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aman90101/test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aman90101/test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Aman90101/test") model = AutoModelForCausalLM.from_pretrained("Aman90101/test", 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 Aman90101/test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aman90101/test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aman90101/test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Aman90101/test
- SGLang
How to use Aman90101/test 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 "Aman90101/test" \ --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": "Aman90101/test", "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 "Aman90101/test" \ --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": "Aman90101/test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Aman90101/test with Docker Model Runner:
docker model run hf.co/Aman90101/test
| # This file must be used with "source <venv>/bin/activate.fish" *from fish* | |
| # (https://fishshell.com/). You cannot run it directly. | |
| function deactivate -d "Exit virtual environment and return to normal shell environment" | |
| # reset old environment variables | |
| if test -n "$_OLD_VIRTUAL_PATH" | |
| set -gx PATH $_OLD_VIRTUAL_PATH | |
| set -e _OLD_VIRTUAL_PATH | |
| end | |
| if test -n "$_OLD_VIRTUAL_PYTHONHOME" | |
| set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME | |
| set -e _OLD_VIRTUAL_PYTHONHOME | |
| end | |
| if test -n "$_OLD_FISH_PROMPT_OVERRIDE" | |
| set -e _OLD_FISH_PROMPT_OVERRIDE | |
| # prevents error when using nested fish instances (Issue #93858) | |
| if functions -q _old_fish_prompt | |
| functions -e fish_prompt | |
| functions -c _old_fish_prompt fish_prompt | |
| functions -e _old_fish_prompt | |
| end | |
| end | |
| set -e VIRTUAL_ENV | |
| set -e VIRTUAL_ENV_PROMPT | |
| if test "$argv[1]" != "nondestructive" | |
| # Self-destruct! | |
| functions -e deactivate | |
| end | |
| end | |
| # Unset irrelevant variables. | |
| deactivate nondestructive | |
| set -gx VIRTUAL_ENV /Users/isaacdavid/Qwen2.5-3B-Instruct-Ori/.venv | |
| set -gx _OLD_VIRTUAL_PATH $PATH | |
| set -gx PATH "$VIRTUAL_ENV/"bin $PATH | |
| set -gx VIRTUAL_ENV_PROMPT .venv | |
| # Unset PYTHONHOME if set. | |
| if set -q PYTHONHOME | |
| set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME | |
| set -e PYTHONHOME | |
| end | |
| if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" | |
| # fish uses a function instead of an env var to generate the prompt. | |
| # Save the current fish_prompt function as the function _old_fish_prompt. | |
| functions -c fish_prompt _old_fish_prompt | |
| # With the original prompt function renamed, we can override with our own. | |
| function fish_prompt | |
| # Save the return status of the last command. | |
| set -l old_status $status | |
| # Output the venv prompt; color taken from the blue of the Python logo. | |
| printf "%s(%s)%s " (set_color 4B8BBE) .venv (set_color normal) | |
| # Restore the return status of the previous command. | |
| echo "exit $old_status" | . | |
| # Output the original/"old" prompt. | |
| _old_fish_prompt | |
| end | |
| set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" | |
| end | |