Text Generation
Transformers
Safetensors
French
qwen2
agent
french
assistant
chatbot
conversational
text-generation-inference
Instructions to use Gopu-poss/gopu-agent-2k-fdf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gopu-poss/gopu-agent-2k-fdf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gopu-poss/gopu-agent-2k-fdf") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Gopu-poss/gopu-agent-2k-fdf") model = AutoModelForCausalLM.from_pretrained("Gopu-poss/gopu-agent-2k-fdf", 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 Gopu-poss/gopu-agent-2k-fdf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gopu-poss/gopu-agent-2k-fdf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gopu-poss/gopu-agent-2k-fdf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Gopu-poss/gopu-agent-2k-fdf
- SGLang
How to use Gopu-poss/gopu-agent-2k-fdf 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 "Gopu-poss/gopu-agent-2k-fdf" \ --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": "Gopu-poss/gopu-agent-2k-fdf", "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 "Gopu-poss/gopu-agent-2k-fdf" \ --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": "Gopu-poss/gopu-agent-2k-fdf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Gopu-poss/gopu-agent-2k-fdf with Docker Model Runner:
docker model run hf.co/Gopu-poss/gopu-agent-2k-fdf
| language: fr | |
| license: apache-2.0 | |
| tags: | |
| - agent | |
| - french | |
| - assistant | |
| - chatbot | |
| pipeline_tag: text-generation | |
| datasets: | |
| - Gopu-poss/gopus-1xs | |
| library_name: transformers | |
| # Gopu Agent 2K FDF | |
| ## Description | |
| Gopu Agent 2K FDF est un modèle d'agent conversationnel en français, conçu pour assister les utilisateurs dans diverses tâches et répondre à leurs questions de manière naturelle et utile. | |
| ## Utilisation | |
| ### Installation | |
| ```bash | |
| pip install transformers torch | |
| ``` | |
| Chargement du modèle | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| model_name = "Gopu-poss/gopu-agent-2k-fdf" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained(model_name) | |
| ``` | |
| Génération de texte | |
| ```python | |
| def generate_response(prompt, max_length=500): | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate( | |
| inputs.input_ids, | |
| max_length=max_length, | |
| num_return_sequences=1, | |
| temperature=0.7, | |
| do_sample=True, | |
| pad_token_id=tokenizer.eos_token_id | |
| ) | |
| response = tokenizer.decode(outputs[0], skip_special_tokens=True) | |
| return response | |
| # Exemple d'utilisation | |
| prompt = "Bonjour, peux-tu m'aider à planifier ma journée ?" | |
| response = generate_response(prompt) | |
| print(response) | |
| ``` | |
| Applications | |
| Ce modèle peut être utilisé pour : | |
| · Assistance conversationnelle | |
| · Réponse aux questions | |
| · Génération de contenu | |
| · Aide à la rédaction | |
| · Support client automatisé | |
| Limitations | |
| · Le modèle peut parfois générer des informations inexactes | |
| · Les réponses peuvent être influencées par les biais présents dans les données d'entraînement | |
| · Performance limitée sur des sujets techniques très spécialisés | |
| Entraînement | |
| Le modèle a été entraîné sur un corpus de textes en français avec une attention particulière sur les interactions conversationnelles. | |
| Avertissement | |
| Ce modèle est fourni "tel quel" sans garantie d'aucune sorte. Les utilisateurs sont responsables de l'utilisation qu'ils en font. | |
| Auteur | |
| Gopu-poss | |
| Licence | |
| Apache 2.0 |