Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

xcczach
/
xturnix-pt

Text Classification
Transformers
Safetensors
Chinese
qwen3
text-generation
custom_code
turn-taking
turn-detection
spoken-dialogue
duplex-conversation
conversational
vllm
text-embeddings-inference
Model card Files Files and versions
xet
Community
1

Instructions to use xcczach/xturnix-pt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use xcczach/xturnix-pt with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-classification", model="xcczach/xturnix-pt", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("xcczach/xturnix-pt", trust_remote_code=True)
    model = AutoModelForCausalLM.from_pretrained("xcczach/xturnix-pt", trust_remote_code=True, 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=256)
    print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
  • Notebooks
  • Google Colab
  • Kaggle
xturnix-pt / examples
1.55 kB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 1 commit
xcczach's picture
xcczach
Publish XTurnix Pretrained from checkpoint-21500-frozen
742eafd verified about 1 month ago
  • transformers_inference.py
    554 Bytes
    Publish XTurnix Pretrained from checkpoint-21500-frozen about 1 month ago
  • vllm_inference.py
    756 Bytes
    Publish XTurnix Pretrained from checkpoint-21500-frozen about 1 month ago
  • vllm_serve.sh
    242 Bytes
    Publish XTurnix Pretrained from checkpoint-21500-frozen about 1 month ago